//create left, right dive here
//if(navigator.appName.indexOf("Netscape")== -1){
var showflash = false;
var imgLeftName = "LeftBanner1.png";
var imgRightName = "RightBanner1.png";
var pathLeftFile = "<a href='http://fiboweb.com' style='border-width:0px'><img src='"+"../../Images/Sidebanner/"+imgLeftName+"' style='border-width:0px'/></a>" ;
var pathRightFile = "<a href='http://fiboweb.com' style='border-width:0px'><img src='"+"../../Images/Sidebanner/"+imgRightName+"' style='border-width:0px'/></a>" ;

document.write('<div id="divAdLeft" style="left: 20px; width: 110px; position: absolute; top: 71px;" align="left">');
//neu muon doi thanh hinh thi sua o day
if( showflash == true){
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" title="b1" width="102" height="353">');
document.write('  <param name="movie" value="upload/quangcaodacbiet/hcc1189741418_banner911_1.swf">');
document.write('  <param name="quality" value="high">');
document.write('  <embed src="./Images/Sidebanner/banner911_1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="110" height="353">');
document.write('</object>');}
// end neu muon doi thanh hinh thi sua o day
else if(showflash == false){
document.write(pathLeftFile);
}
document.write('</div>');


document.write('<div id="divAdRight" style="left: 910px; width: 110px; position: absolute; top: 71px;" align="right">');
if( showflash == true){

// neu muon doi thanh hinh thi sua o day
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="102" height="353">');
document.write('  <param name="movie" value="upload/quangcaodacbiet/hcc1189741436_banner911_2.swf">');
document.write('  <param name="quality" value="high">');
document.write('  <embed src="banner911_2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="110" height="353">');
document.write('</object>');}
//end neu muon doi thanh hinh thi sua o day
else if(showflash == false){
document.write(pathRightFile);
}
document.write('</div>');
//}

//end create


// JavaScript Document
function FloatTopDiv()
	{
		startX = document.body.clientWidth - 125, startY = 205;
		var ns = (navigator.appName.indexOf("Netscape") != -1);
		var d = document;
			
		if (document.body.clientWidth < 980) startX = -125;

		
		function ml(id)
		{
			var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
			if(d.layers)el.style=el;
			el.sP=function(x,y){this.style.left=x;this.style.top=y;};
			el.x = startX;
			el.y = startY;
			return el;
		}
		
		window.stayTopLeft=function()
		{
		
			if (document.body.clientWidth < 980)
			{
				ftlObj.x = - 115;ftlObj.y = 0;	ftlObj.sP(ftlObj.x, ftlObj.y);
			}
			
			else
			{
			if (document.documentElement && document.documentElement.scrollTop)
				var pY = ns ? pageYOffset : document.documentElement.scrollTop;
			else if (document.body)
				var pY = ns ? pageYOffset : document.body.scrollTop;

			if (document.body.scrollTop > 205){startY = 3} else {startY = 205};

			if (document.body.clientWidth >= 1024)
			{
				ftlObj.x = document.body.clientWidth - 125;ftlObj.y += (pY + startY - ftlObj.y)/32;ftlObj.sP(ftlObj.x, ftlObj.y);
			}
			else
			{
			    if(navigator.appName.indexOf("Netscape")== -1){
			        ftlObj.x  = startX;
			    }
			    else{
			        ftlObj.x  = startX - 20;
			    }
			    ftlObj.y += (pY + startY - ftlObj.y)/32;
			    ftlObj.sP(ftlObj.x, ftlObj.y);
			}
			}
			setTimeout("stayTopLeft()", 1);
		}
		
		ftlObj = ml("divAdRight");
		stayTopLeft();
		
	}
	
  function FloatTopDiv2()
	{
		startX2 = document.body.clientWidth - 1008, startY2 = 205;
		var ns2 = (navigator.appName.indexOf("Netscape") != -1);
		var d2 = document;
			
		if (document.body.clientWidth < 980) startX2 = -110;
		
		function ml2(id)
		{
			var el2=d2.getElementById?d2.getElementById(id):d2.all?d2.all[id]:d2.layers[id];
			if(d2.layers)el2.style=el2;
			el2.sP=function(x,y){this.style.left=x;this.style.top=y;};
			el2.x = startX2;
			el2.y = startY2;
			return el2;
		}
		
		window.stayTopLeft2=function()
		{
			if (document.body.clientWidth < 980)
			{
				ftlObj2.x = - 150;ftlObj2.y = 0;	ftlObj2.sP(ftlObj2.x, ftlObj2.y);
			}
			else
			{
			if (document.documentElement && document.documentElement.scrollTop)
				var pY2 = ns2 ? pageYOffset : document.documentElement.scrollTop;
			else if (document.body)
				var pY2 = ns2 ? pageYOffset : document.body.scrollTop;

			if (document.body.scrollTop > 205){startY2 = 3} else {startY2 = 205};

			if (document.body.clientWidth >= 1024)
			{
				ftlObj2.x =  0;ftlObj2.y += (pY2 + startY2 - ftlObj2.y)/32;	ftlObj2.sP(ftlObj2.x, ftlObj2.y);
			}
			else
			{			
			    ftlObj2.x  = startX2;
			    ftlObj2.y += (pY2 + startY2 - ftlObj2.y)/32;
			    ftlObj2.sP(ftlObj2.x, ftlObj2.y);
			}
			}
			setTimeout("stayTopLeft2()", 1);
		}
		
		ftlObj2 = ml2("divAdLeft");
		stayTopLeft2();
		
	}


	function ShowAdDiv()
	{
		var objAdDivLeft  = document.getElementById("divAdLeft");
		var objAdDivRight = document.getElementById("divAdRight");
		
		if (document.body.clientWidth < 980)
		{
			objAdDivLeft.style.left  = - 110;
			objAdDivRight.style.left = - 110;
		}
		
		else
		{
			objAdDivLeft.style.left  = 0;
			objAdDivRight.style.left = document.body.clientWidth - 110;
		}
		
		FloatTopDiv();
		FloatTopDiv2();
	}
	ShowAdDiv();
