﻿var newWindow = null;

function popUpWin(url, type, strWidth, strHeight){
		
	type = type.toLowerCase();
		
	if (type == "fullscreen"){
		strWidth = screen.availWidth;
		strHeight = screen.availHeight;
	}
	
	var tools="";
	
	if (type == "standard") tools = "resizable,toolbar=yes,location=yes,scrollbars=yes,menubar=yes,width="+strWidth+",height="+strHeight;
	if (type == "console" || type == "fullscreen") tools = "resizable,toolbar=no,location=no,scrollbars=no,width="+strWidth+",height="+strHeight;
	
	if(newWindow != undefined) newWindow.close();
	
	newWindow = window.open(url, 'newWin', tools);
	newWindow.focus();
	
}


var refr=escape(document.referrer); /* get the http referer and encode it */
var dom=location.hostname; /* get the host domain */

var url = document.location.toString();

var stURL="http://link.decideinteractive.com/n/44117/53241/"+url+"/1taz207;11;3;;6;;1b7evu;;;;;1;/i/c?0&pq=%2f&1pixgif&referer=" + refr;
if ( (refr && refr.search(dom) == -1) && (location.href.toUpperCase().indexOf("247SEO=N") == -1) ) /* if the referrer is external preload the image request and does not contain 247SEO argument = "N" */
{
	imageTR = new Image();
	imageTR.src = stURL;
}
