var str_object_1,str_object_var,str_object_2;
var str_object_var1,str_object_3;
str_object_1="<div align=left id=\"slide_banner\" style=\"width:409px\">&nbsp;</div>";
str_object_1+="<div id=\"lay1\" name=\"lay1\" style=\"WIDTH:400px;HEIGHT:300px;POSITION: absolute;overflow:none;display:none\">";
str_object_1+="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"   codebase=\"http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0\" id=\"lt_banner1\" height=\"300\" width=\"400\" VIEWASTEXT>";
str_object_1+="<param name=\"movie\" value=\"/flash/400x300/main.swf\">";
str_object_1+="<param name=\"quality\" value=\"high\">";
str_object_var="<PARAM NAME=\"FlashVars\" VALUE=\"myid=r\">";
str_object_2="<PARAM NAME=\"bgcolor\" VALUE=\"#FFFFFF\">";
str_object_2+="<PARAM NAME=\"wmode\" VALUE=\"transparent\">";
str_object_2+="<param name=\"swliveconnect\" value=\"true\">";
str_object_var1="<embed FlashVars=\"myid=r\" ";
str_object_3="src=\"/flash/400x300/main.swf\" quality=\"high\"  ";
str_object_3+="swliveconnect=\"true\" name=\"lt_banner1\" type=\"application/x-shockwave-flash\" ";
str_object_3+="pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" ";
str_object_3+="height=\"300\" width=\"400\">";
str_object_3+="</object>";
str_object_3+="<div align=center style=\"background-color:#DCEAFE\"><a style=\"color:#FF0000;\" href=\"javascript:fromFlash()\" title=\"Click Here to close this advertisement\">Close</a></div>";
str_object_3+="</div>"
str_f=str_object_1+str_object_var+str_object_2+str_object_var1+str_object_3;
//document.write(str_f);
//-------------------
var tn=0,rnd_swf=1;
var ie=(document.all);
var w3=(document.getElementById && !ie);
var ad_flash_time=48, ad_js_time=117;
var adCount=0;
tn=setInterval("setLyr()",3050);
function setLyr()
	{
		var newX = findPosX(document.getElementById("slide_banner"));
		var newY = findPosY(document.getElementById("slide_banner"));		
		rnd_swf=1;
		document.getElementById("lay1").style.top = newY + 'px';
		document.getElementById("lay1").style.left = newX + 'px';
		document.getElementById("lay1").style.display="";
		//showAd();
		clearInterval(tn);
		//tn=setInterval("loadimg()",1550);
	}
function on_setLyr()
	{
		str_f="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"   codebase=\"http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0\" id=\"lt_banner1\" height=\"300\" width=\"400\" VIEWASTEXT>";
		str_f+="<param name=\"movie\" value=\"/flash/400x300/main.swf\">";
		str_f+="<param name=\"quality\" value=\"high\">";
		str_f+="<PARAM NAME=\"FlashVars\" VALUE=\"myid=H\">";
		str_f+="<PARAM NAME=\"bgcolor\" VALUE=\"#FFFFFF\">";
		str_f+="<PARAM NAME=\"wmode\" VALUE=\"opaque\">";
		str_f+="<param name=\"swliveconnect\" value=\"true\">";
		str_f+="<embed FlashVars=\"myid=H\" ";
		str_f+="src=\"/flash/400x300/main.swf\" quality=\"high\"  ";
		str_f+="swliveconnect=\"true\" name=\"lt_banner1\" type=\"application/x-shockwave-flash\" ";
		str_f+="pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" ";
		str_f+="height=\"300\" width=\"400\">";
		str_f+="</object>";
		str_f+="<div align=center style=\"background-color:#DCEAFE\"><a style=\"color:#FF0000;\" href=\"javascript:fromFlash()\" title=\"Click Here to close this advertisement\">Close</a></div>";
		str_f+="</div>"
		document.getElementById("lay1").innerHTML=str_f;
		
		adCount=0;
		var newX = findPosX(document.getElementById("slide_banner"));
		var newY = findPosY(document.getElementById("slide_banner"));
		document.getElementById("lay1").style.top = newY + 'px';
		document.getElementById("lay1").style.left = newX + 'px';
		document.getElementById("lay1").style.display="";
		//showAd();
		//document.getElementById("lt_banner1").setAttribute("FlashVars")="myid=H";
		//document.getElementsByName("lt_banner1").item(0).setAttribute("FlashVars")="myid=H";
		if(ie)
			document.getElementById("lt_banner1").Rewind();
	}
function loadimg()
{
		//str_img_lnk="<a href='"+document.getElementById("hrf"+rnd_swf).value+"' target=_top>";
		str_img_lnk="<a href='Javascript:on_setLyr()' target=_top>";
		str_img_lnk+="<img src='"+document.getElementById("img"+rnd_swf).value+"' border=0 onclick='Javascript:on_setLyr()' usemap=\"#tt_2_Map\">";
		str_img_lnk+="</a>";
		document.getElementById("slide_banner").innerHTML=str_img_lnk;
		clearInterval(tn);
}
function chgimg(str)
{	
	if(str=="0")
	{
		str_img_lnk="<a href='http://www.schoolsoftwares.com/timetable_Software_overview.html' target=_top onclick='javascript:on_setLyr()'>";
		str_img_lnk+="<img src='http://www.winentrance.com/flash/400x300/tt-400x60.gif' border=0 onclick='javascript:on_setLyr()' usemap=\"#tt_map\">";
		str_img_lnk+="</a>";
		str_img_lnk+="<map name=\"tt_map\">";
		str_img_lnk+="<area shape=\"rect\" alt=\"GIFT-School Timetable Framing Software\" coords=\"348,0,400,35\" href=\"http://www.schoolsoftwares.com/timetable_Software_overview.html\" target=\"_blank\">";
		str_img_lnk+="<area shape=\"rect\" alt=\"GIFT-School Timetable Framing Software\" coords=\"0,0,347,60\" href=\"http://www.schoolsoftwares.com/timetable_Software_overview.html\" target=\"_blank\">";
		str_img_lnk+="<area shape=\"rect\" alt=\"Replay Ads\" coords=\"348,36,400,59\" href=\"Javascript:on_setLyr()\" target=\"_self\">";
		str_img_lnk+="</map>";
		document.getElementById("slide_banner").innerHTML=str_img_lnk;
	}
	else if(str=="1")
	{
		str_img_lnk="<a href='http://www.schoolsoftwares.com/question_paper_preparation_Software_overview.html' target=_top>";
		str_img_lnk+="<img src='http://www.winentrance.com/flash/400x300/QB-400x60.gif' border=0 onclick='Javascript:on_setLyr()' usemap=\"#qb_map\">";
		str_img_lnk+="</a>";
		str_img_lnk+="<map name=\"qb_map\">";
		str_img_lnk+="<area shape=\"rect\" alt=\"GIFT-qb - Question Paper Setting and Preparation Software\" coords=\"322,36,399,60\" href=\"http://www.schoolsoftwares.com/question_paper_preparation_Software_overview.html\" target=\"_blank\">";
		str_img_lnk+="<area shape=\"rect\" alt=\"GIFT-qb - Question Paper Setting and Preparation Software\" coords=\"322,0,399,17\" href=\"http://www.schoolsoftwares.com/question_paper_preparation_Software_overview.html\" target=\"_blank\">";
		str_img_lnk+="<area shape=\"rect\" alt=\"GIFT-qb - Question Paper Setting and Preparation Software\" coords=\"0,0,321,59\" href=\"http://www.schoolsoftwares.com/question_paper_preparation_Software_overview.html\" target=\"_blank\">";
		str_img_lnk+="<area shape=\"rect\" alt=\"Replay Ads\" coords=\"322,18,399,36\" href=\"Javascript:on_setLyr()\" target=\"_self\">";
		str_img_lnk+="</map>";
		document.getElementById("slide_banner").innerHTML=str_img_lnk;
	}
	else if(str=="2")
	{
		str_img_lnk="<a href='http://www.schoolsoftwares.com/Students-Mark-Analysis-Rank-Card-Preparation-Software-overview.html' target=_top>";
		str_img_lnk+="<img src='http://www.winentrance.com/flash/400x300/MARP-400x60.gif' border=0 onclick='Javascript:on_setLyr()' usemap=\"#marp_map\">";
		str_img_lnk+="</a>";
		str_img_lnk+="<map name=\"marp_map\">";
		str_img_lnk+="<area shape=\"rect\" alt=\"GIFT-Students Mark Analysis & Rank Card Software\" coords=\"341,0,399,37\" href=\"http://www.schoolsoftwares.com/Students-Mark-Analysis-Rank-Card-Preparation-Software-overview.html\" target=\"_blank\">";
		str_img_lnk+="<area shape=\"rect\" alt=\"GIFT-Students Mark Analysis & Rank Card Software\" coords=\"0,0,341,59\" href=\"http://www.schoolsoftwares.com/Students-Mark-Analysis-Rank-Card-Preparation-Software-overview.html\" target=\"_blank\">";
		str_img_lnk+="<area shape=\"rect\" alt=\"Replay Ads\" coords=\"341,37,399,58\" href=\"Javascript:on_setLyr()\" target=\"_self\">";
		str_img_lnk+="</map>";
		document.getElementById("slide_banner").innerHTML=str_img_lnk;
	}
	else if(str=="3")
	{
		str_img_lnk="<a href='http://www.schoolsoftwares.com/School-Fees-Collection-software-overview.html' target=_top>";
		str_img_lnk+="<img src='http://www.winentrance.com/flash/400x300/fees-400x60.gif' border=0 onclick='Javascript:on_setLyr()' usemap=\"#marp_map\">";
		str_img_lnk+="</a>";
		str_img_lnk+="<map name=\"marp_map\">";
		str_img_lnk+="<area shape=\"rect\" alt=\"Schools Fees Collection Software\" coords=\"0,0,324,60\" href=\"http://www.schoolsoftwares.com/Students-Mark-Analysis-Rank-Card-Preparation-Software-overview.html\" target=\"_blank\">";
		str_img_lnk+="<area shape=\"rect\" alt=\"Schools Fees Collection Software\" coords=\"324,0,399,35\" href=\"http://www.schoolsoftwares.com/Students-Mark-Analysis-Rank-Card-Preparation-Software-overview.html\" target=\"_blank\">";
		str_img_lnk+="<area shape=\"rect\" alt=\"Replay Ads\" coords=\"324,35,395,59\" href=\"Javascript:on_setLyr()\" target=\"_self\">";
		str_img_lnk+="</map>";
		document.getElementById("slide_banner").innerHTML=str_img_lnk;
	}		
	clearInterval(tn);
}
function findPosX(obj)
	{
		var curleft = 0;
		if (obj.offsetParent)
		{
			while (obj.offsetParent)
			{
				curleft += obj.offsetLeft
				obj = obj.offsetParent;
			}
		}
		else if (obj.x)
			curleft += obj.x;
		return curleft;
	}

	function findPosY(obj)
	{
		var curtop = 0;
		if (obj.offsetParent){
			while (obj.offsetParent){
				curtop += obj.offsetTop
				obj = obj.offsetParent;
			}
		}
		else if (obj.y)
			curtop += obj.y;
		return curtop;
	}
	function showAd()
	{
		if(adCount<10.3*ad_flash_time){
			adCount+=1;
			setTimeout("showAd()",ad_js_time);
		}else fromFlash();
	}
	function fromFlash()
	{
		if (ie||w3)
			document.getElementById("lay1").style.display="none";
		else
			document.getElementById("lay1").style.visibility ="hide";		
	}