	var dualCtr = '1';

	function adsvrFlipDualAd() {
		if (dualCtr=='1')
		{			
			document.getElementById('divMain').style.visibility='hidden';
			document.getElementById('divDualAd').style.visibility='visible';
			dualCtr='2';
		} else {
			document.getElementById('divMain').style.visibility='visible';		
			document.getElementById('divDualAd').style.visibility='hidden';
			dualCtr='1';
		}
	}
	function adsvrDisplaySingleAd(vImgRoot,vhtmlAd,vRC, vAppRoot, vID, vDivW, vDivH, vBtnW, vBtnH, vBtnT, vBtnL, vImgDualSwitch, vLid, vImgBdr, vImgMain,imgTarget,bgclr)
	{
            
		if (vRC == "0") 
		{ 
		   
               if(vhtmlAd == "0")
			{
			     	
			     document.write("<div id='" + vID + "' style='Height:" + vDivH + ";Width:" + vDivW + "'>");
			     document.write("<A HREF='" + vAppRoot + "/servlet/WebF_AdManager.AdLinkManager?lid=" + vLid + "' TARGET='"+ imgTarget +"'><img  border='" + vImgBdr + "' src='" + vImgRoot + vImgMain + "' height='" + vDivH + "' width='" + vDivW + "'></A>");				     
			     document.write("</div>");
			}
                else if(vhtmlAd == "Advhtml")
			{
                             //alert(vImgRoot);
                             //alert(vImgRoot.replace(/\^/gi, "'"));
			     document.write("<div id='" + vID + "' style='Height:" + vDivH + ";Width:" + vDivW + "'>");
                             document.write(vImgRoot.replace(/\^/gi, "'"));
                             document.write("</div>");
			}
			else if(vhtmlAd == "text")
			{
			     //alert(vImgRoot + "inside");	
			     document.write("<div id='" + vID + "' style='background-color:" + bgclr + "; Height:" + vDivH + ";Width:" + vDivW + "'>");
			     document.write("<A HREF='" + vAppRoot + "/servlet/WebF_AdManager.AdLinkManager?lid=" + vLid + "' TARGET='"+ imgTarget +"'>" + vImgMain + "</A>");				     
			     document.write("</div>");
			}
			else if(vhtmlAd == "inflash")
			{
			     document.write("<script language='javascript'>;");			     	
			     //document.write("alert('hi');");
			     document.write("var vOBJECT_URL ='" + vImgRoot  + vImgMain + "';"); 			     
			     document.write("var vOBJECT_CLICK ='" + vAppRoot + "/servlet/WebF_AdManager.AdLinkManager?lid=" + vLid + "';"); 
			     //document.write("alert(vOBJECT_URL);");
                             //document.write("alert(vOBJECT_CLICK);");
                             document.write("</script>");
			}
			else
			{	
			  //alert(vhtmlAd.replace(/\^/gi, "'"));
//			   var vhtml = "<object width='468' height='60' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0'><param name='movie' value='http://localhost:2228/Adserversolutions/ads/55.swf?clickTAG=http://www.Igoogle.com'><param name='quality' value='High'><param name='play' value='True'><param name='loop' value='False'><param name='menu' value='False'><param name='scale' value='Showall'><EMBED src='http://localhost:2228/Adserversolutions/ads/55.swf' quality=high WIDTH='468' HEIGHT='60' NAME='' ALIGN='' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'></EMBED></object>";			  
//			   alert(vhtml + "inside");	
			  document.write("<div id='" + vID + "' style='Height:" + vDivH + ";Width:" + vDivW + "'>");
			  document.write(vhtmlAd.replace(/\^/gi, "'"));
			  document.write("</div>");
			}
		} 
		else
		{    
			adsvrDisplayOtherNetworks();
		}
	}
	function adsvrDisplayDualAd(vImgRoot,vRC, vAppRoot, vID, vDivW, vDivH, vBtnW, vBtnH, vBtnT, vBtnL, vImgDualSwitch, vLid, vImgBdr, vImgMain, vImgDual) {
		
            if (vRC == "0")
		{
			document.write("<div id='" + vID + "' style='Height:" + vDivH + ";Width:" + vDivW + "'>");
			document.write("<div id='divBtn1' style='Z-INDEX:1; POSITION:absolute; WIDTH:" + vBtnW + "px; HEIGHT:" + vBtnH + "px; TOP:" + vBtnT + "px; left:" + vBtnT + "px;'><img src ='" + vAppRoot + "/ui/images/flag.png' onclick='adsvrFlipDualAd();'></div>");
			document.write("<div id= 'divMain' style='display:inline; visibility:visible; position:absolute'><A HREF='" + vAppRoot + "/servlet/WebF_AdManager.AdLinkManager?lid=" + vLid + "' TARGET='_blank'><img border='" + vImgBdr + "' src='" + vImgRoot + vImgMain + "' height='" + vDivH + "' width='" + vDivW + "'></A></div>");
			document.write("<div id='divDualAd' style='display:inline; visibility:hidden; position:absolute;'><A HREF='" + vAppRoot + "/servlet/WebF_AdManager.AdLinkManager?lid=" + vLid + "' TARGET='_blank'><img border='" + vImgBdr + "' src='" + vImgRoot + vImgDual + "' height='" + vDivH + "' width='" + vDivW + "'></A></div>");
			document.write("</div>");		
		} else {
			adsvrDisplayOtherNetworks();
		}
	}

