// -- THE SERVER TO WHICH THE WIDGET POINTS....!
var host='http://www.mojopages.com/';
if(Boolean(typeof requestForWidget != 'undefined' && requestForWidget))
{
	var extraParam='&requestForWidget='+requestForWidget;
	if(requestForWidget=='small')
	{
		panelwidth=parseInt(panelwidth)+6;
		panelheight=parseInt(panelheight)+3;
	}
}	
else
{
	var extraParam="";
	if(WidgetType=='small')
	{
		panelwidth=parseInt(panelwidth)+6;
		panelheight=parseInt(panelheight)+3;
	}
}
//DOES NOT COUNT IMPRESSION
if(Boolean(typeof impressionCount != 'undefined' && impressionCount))
{
	extraParam+='&impressionCount='+impressionCount;	
}	
//////////////////////////////////////		
if(document.getElementById('Iframe1') != null)
{	
	document.write('<iframe  scrolling="no" name="Iframe2" id="Iframe2" frameborder="0" vspace="0" hspace="0" marginwidth="0" marginheight="0" width="'+panelwidth+'"  height="'+panelheight+'"  src="'+host+'partnerwidgets/widget.php?panelwidth='+panelwidth+'&partnerId='+partnerId+'&partnerCity='+partnerCity+'&twowidgets=2&partnerState='+partnerState+extraParam+'" onload="iframe2(this)"></iframe>');
}
else
{	
	document.write('<iframe  scrolling="no" name="Iframe1" id="Iframe1" frameborder="0" vspace="0" hspace="0" marginwidth="0" marginheight="0" width="'+panelwidth+'"  height="'+panelheight+'"  src="'+host+'partnerwidgets/widget.php?panelwidth='+panelwidth+'&partnerId='+partnerId+'&partnerCity='+partnerCity+'&twowidgets=1&partnerState='+partnerState+extraParam+'"   onload="iframe1(this)"></iframe>');
}
function change_parent_url(url)
{
	urltmp=url
	document.location=urltmp;
	//delayID=setInterval("watchurl()",1000);style="border:1px solid green"
}
function iframe1(obj)
{
	//alert("Iframe1-Width-"+obj.width);
	//alert("Iframe1-Height-"+obj.height);
}
function iframe2(obj)
{
	//alert("Iframe2-Width-"+obj.width);
	//	alert("Iframe2-Height-"+obj.height);
}