var showPop = 1;
var intShowToolbar = 0;

function myPop(strPopupUrl)
{
		var d = new Date();
		pundername = 'newpop'+d.getTime();
		if( intShowToolbar == 0)
		{
			newpop = window.open(strPopupUrl, pundername, 'directories=0,menubar=0,width='+screen.width+',height='+screen.height);
		}
		else if( intShowToolbar == 2)
		{
			newpop = window.open(strPopupUrl, 'cslpu', 'directories=0,menubar=0,width=720,height=300');
		}
		else
		{
			newpop = window.open(strPopupUrl, pundername, "status=1, location=1, toolbar=1,directories=1, top=0, left=0, resizable=1, scrollbars=1, width="+screen.width+",height="+screen.height+",menubar=1");

		}
		if (newpop!=null && typeof(newpop)!="undefined")
		{
			newpop.blur();
		}
		return newpop;
}


function showPopunder (strPopupUrl, intShowTool, strCasaleUrl)
{
      if(showPop==1)
      {
		showPop = 0;
		intShowToolbar = intShowTool;
		var wopen = myPop(strPopupUrl);
		if (!window.opera && (wopen==null || typeof(wopen)=="undefined"))
		{
			x= document.getElementById('popupbutton');
			x.onchange();
		}
		
		if(typeof(strCasaleUrl)!='undefined' && strCasaleUrl != '')
		{
			intShowToolbar = 2;
			wopen = myPop(strCasaleUrl);
			if (!window.opera && (wopen==null || typeof(wopen)=="undefined"))
			{
				x= document.getElementById('popupbutton');
				x.onchange();
			}
		}
    }
}


