//Printer and email pop up
function openPopupWindow(strURL, intWidth, intHeight, strPopupOptions)
{
	
	var today = new Date();
	
	var timestamp = today.getTime();

	window.open(strURL,timestamp,"width="+intWidth+",height="+intHeight+","+strPopupOptions);
}


//Purpose: Opens up new browser window according to PMUSA specs 011409
function openNewBrowserWindow(strURL)
			{
				var today = new Date();				
				var timestamp = today.getTime();

				//Begin WebTrends click-tracking
				try {
					if (WebTrends){//Verify that the WebTrends object exists, if it does not, we cannot continue
						if (WebTrends&&(typeof(_tag)=="undefined")){ 
							//If the WebTrends object exists, but an instance does not, instantiate a new object
							var _tag=new WebTrends();
							var _webTrendsExtender=new ALCSWebTrendsExtender();					
						}
						var url="";
						if ((strURL.toLowerCase().indexOf("redirect.asp?targeturl=")!=-1)||(strURL.toLowerCase().indexOf("redirect.asp?url=")!=-1)){
							//If the redirect is being used
							//Capture the URL of the anchor tag and pass the info to the WebTrends object
							url = strURL.substring(strURL.indexOf("=")+1);
						} else { //Otherwise use the value of strURL
							url = strURL;
						}						
						var host="";
						var uri="";
						var qry="";
						//RegEx for Parsing URL
						var urlRegEx = new RegExp(/^((https?):\/\/)?([^:\/\?\#\s]+)([^\?]+)?([\?]+.*)?$/); // changed 1/12/09
						//Parse the URL using a reg. expression, we cannot use JavaScript's e.hostname, e.pathname...etc
						var m = urlRegEx.exec(url);	
						if (m!=null){
							host=m[3];
							uri=m[4];
							qry=m[5]||"";
						} else {
							uri=url;
						}
						var title = "Offsite: " + host+uri+qry; //CHANGED 1/12/09
						var contentGroup = _webTrendsExtender.GetContentGroup();
						_tag.dcsMultiTrack("DCS.dcssip",host,"DCS.dcsuri",uri,"DCS.dcsqry",qry,"WT.ti",title,"WT.dl","24","WT.cg_n",contentGroup);						
					}									
				} catch (ex) {
					//Suppress error messages
				}
				//End WebTrends click-tracking
				window.open(strURL, timestamp, 'toolbar=yes,location=yes,status=no,menubar=yes,scrollbars=yes,resizable=yes');
			}
// End new window script			

//Purpose: Passes spotlight tags in PDF downloads
function filedownload(refer) {
var axel = Math.random() + "";
var num = axel * 1000000000000000000;
var spotpix = new Image();
spotpix.src = "http://fls.doubleclick.net/activityi;src=1485084;type=phili161;cat=broch695;ord=1;num=1" + num;
spotpix.onload = passed(refer);
}

function passed(refer) {
	var PDFvar = refer;
	if (PDFvar != '') {
		if (PDFvar == "esPDF_spEd") {
			top.location.href = "/es/prc/pdf/spanish_educando.pdf";
		}
		else if (PDFvar == "esPDF_engEd") {
			top.location.href = "/es/prc/pdf/english_educando.pdf";
		}
		else if (PDFvar == "esPDF_rkwds") {
			top.location.href = "/es/prc/pdf/RKWDS_Brochure.pdf";
		}
		else if (PDFvar == "esPDF_peer") {
			top.location.href = "/es/prc/pdf/peerpressure_Brochure.pdf";
		}
		else if (PDFvar == "esPDF_couldSl") {
			top.location.href = "/es/prc/pdf/couldyourkid_sl.pdf";
		}
		else if (PDFvar == "esPDF_couldEng") {
			top.location.href = "/es/prc/pdf/couldyourkid_eng.pdf";
		}
		else if (PDFvar == "esPDF_couldBroch") {
			top.location.href = "/es/prc/pdf/couldyourkid_Brochure.pdf";
		}
		else if (PDFvar == "esPDF_styles") {
			top.location.href = "/es/prc/pdf/parentingstyles_Brochure.pdf";
		}
		else if (PDFvar == "esPDF_preteen") {
			top.location.href = "/es/prc/pdf/preteen_Brochure.pdf";
		}
		else if (PDFvar == "esPDF_preventing") {
			top.location.href = "/es/prc/pdf/preventing_brochure.pdf";
		}
		else if (PDFvar == "esPDF_preventingTob") {
			top.location.href = "/es/prc/pdf/preventingtobacco_brochure.pdf";
		}
		else if (PDFvar == "esPDF_tips") {
			top.location.href = "/es/prc/pdf/tips_brochure.pdf";
		}
	}
	else  {
		alert('File not found');
	}
}