// JavaScript Document
function popup(url,winname,w,h,feat)
{
	if (!(isNaN(w) || isNaN(h)))
	{
		var x=parseInt((screen.width-w)/2);
		var y=parseInt((screen.height-h)/2);
		if (x<0)	x=0;
		if (y<0)	y=0;
		
		if (feat!=null && feat!="")
		{
			feat=","+feat;
		}
		else
		{
			feat="";
		}
		feat="left="+x+",top="+y+",width="+w+",height="+h+feat;
	}
	window.open(url,winname,feat);
}

function quicklinkchange(id){
	newval = document.getElementById(id).value;

	if(newval != ""){
		if(newval == "all"){
			//go to landing page
			
			switch(id){
				case "ql_audience":
					document.location = dotdotpath + "audiences/";
					break;
				case "ql_publisher":
					document.location = dotdotpath + "ipc-brands/";
					break;
				case "ql_platform":
					document.location = dotdotpath + "ipc-brands/";
					break;
				case "ql_brand":
					document.location = dotdotpath + "ipc-brands/";
					break;
			}
		} else if(!isNaN(newval)){
			//go to detail page
			
			switch(id){
				case "ql_audience":
					document.location = dotdotpath + "audiences/detail.cfm?audienceid=" + newval;
					break;
				case "ql_publisher":
					document.location = dotdotpath + "contact-ipc-advertising/detail.cfm?ContactID=" + newval;
					break;
				case "ql_platform":
					document.location = dotdotpath + "ipc-brands/?BrandPlatformID=" + newval;
					break;
				case "ql_brand":
					document.location = dotdotpath + "ipc-brands/detail.cfm?brandid=" + newval;
					break;
			}
		} else {
			//error?!?
		}		
	} else {
		//Please select...
	}
		
}