// Common part Position Start Here 
var offsetX=0;
var offsetY=0;
var bn=navigator.platform
var leftmargin=0
var scrheight=0;scrwidth=0;
var bw=navigator.userAgent;
var os="Win"
var ie=false;
var ns=false;
var sf=false;
var fx=false
var op=false;
var mz=false;
scrheight =(window.screen.height);
scrwidth =(window.screen.width);
//alert("scrheight:" +scrheight +" scrwidth:" +scrwidth);
//alert(bw);
if(bn.indexOf("Win32")==-1){os="Mac";}
if(bw.indexOf("Opera")!=-1)
{op=true;}
else if(bw.indexOf("Safari")!=-1)
{sf=true;}
else if(bw.indexOf("Firefox")!=-1)
{fx=true;}
else if(bw.indexOf("MSIE")!=-1)
{ie=true;}
else if(bw.indexOf("Netscape")!=-1 && bw.indexOf("Mozilla")!=-1)
{ns=true;}
else if(bw.indexOf("Mozilla")!=-1)
{mz=true;}
else
{op=true;}	

function setPos(pos)
{
	if(os=="Win")
	{
		if(ie)
		{
			if(parseInt(scrwidth)=="800" && parseInt(scrheight)=="600") {offsetX=parseInt(pos[0]);offsetY=parseInt(pos[1]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[2]);offsetY=parseInt(pos[3]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[4]);offsetY=parseInt(pos[5]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[6]);offsetY=parseInt(pos[7]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[8]);offsetY=parseInt(pos[9]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="800"){offsetX=parseInt(pos[10]);offsetY=parseInt(pos[11]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[12]);offsetY=parseInt(pos[13]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[14]);offsetY=parseInt(pos[15]);}
			
			//alert("X:"+offsetX+"   Y:"+offsetY);
		}
		else if(op)
		{
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[16]);offsetY=parseInt(pos[17]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[18]);offsetY=parseInt(pos[19]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[20]);offsetY=parseInt(pos[21]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[22]);offsetY=parseInt(pos[23]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[24]);offsetY=parseInt(pos[25]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="800"){offsetX=parseInt(pos[26]);offsetY=parseInt(pos[27]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[28]);offsetY=parseInt(pos[29]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[30]);offsetY=parseInt(pos[31]);}
			
			//alert("X:"+offsetX+"   Y:"+offsetY);
		}
		else if(fx)
		{
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[32]);offsetY=parseInt(pos[33]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[34]);offsetY=parseInt(pos[35]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[36]);offsetY=parseInt(pos[37]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[38]);offsetY=parseInt(pos[39]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[40]);offsetY=parseInt(pos[41]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="800"){offsetX=parseInt(pos[42]);offsetY=parseInt(pos[43]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[44]);offsetY=parseInt(pos[45]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[46]);offsetY=parseInt(pos[47]);}
			
			//alert("offsetX:" +offsetX +"offsetY:"+offsetY );
		}
		else if(ns)
		{
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[48]);offsetY=parseInt(pos[49]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[50]);offsetY=parseInt(pos[51]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[52]);offsetY=parseInt(pos[53]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[54]);offsetY=parseInt(pos[55]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[56]);offsetY=parseInt(pos[57]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="800"){offsetX=parseInt(pos[58]);offsetY=parseInt(pos[59]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[60]);offsetY=parseInt(pos[61]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[62]);offsetY=parseInt(pos[63]);}
			
			//alert("offsetX:" +offsetX +"offsetY:"+offsetY );
		}
		else if(mz)
		{
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[64]);offsetY=parseInt(pos[65]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[66]);offsetY=parseInt(pos[67]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[68]);offsetY=parseInt(pos[69]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){offsetX=parseInt(pos[70]);offsetY=parseInt(pos[71]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[72]);offsetY=parseInt(pos[73]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="800"){offsetX=parseInt(pos[74]);offsetY=parseInt(pos[75]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[76]);offsetY=parseInt(pos[77]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){offsetX=parseInt(pos[78]);offsetY=parseInt(pos[79]);}
			
			//alert("offsetX:" +offsetX +"offsetY:"+offsetY );
		}
	}
	else if(os=="Mac")
	{
		if(ie)
		{
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[80]);offsetY=parseInt(pos[81]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[82]);offsetY=parseInt(pos[83]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[84]);offsetY=parseInt(pos[85]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[86]);offsetY=parseInt(pos[87]);}
			//alert("X:"+offsetX +"Y:" +offsetY);
		}
		else if(op)
		{
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[88]);offsetY=parseInt(pos[89]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[90]);offsetY=parseInt(pos[91]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[92]);offsetY=parseInt(pos[93]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[94]);offsetY=parseInt(pos[95]);}
			//alert("X:"+offsetX +"Y:" +offsetY);
		}
		else if(fx)
		{
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[96]);offsetY=parseInt(pos[97]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[98]);offsetY=parseInt(pos[99]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[100]);offsetY=parseInt(pos[101]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[102]);offsetY=parseInt(pos[103]);}
			//alert("X:"+offsetX +"Y:" +offsetY);
		}
		else if(ns)
		{
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[104]);offsetY=parseInt(pos[105]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[106]);offsetY=parseInt(pos[107]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[108]);offsetY=parseInt(pos[109]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[110]);offsetY=parseInt(pos[111]);}
			//alert("X:"+offsetX +"Y:" +offsetY);
		}

		else if(sf)
		{
			if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){offsetX=parseInt(pos[112]);offsetY=parseInt(pos[113]);}
			if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){offsetX=parseInt(pos[114]);offsetY=parseInt(pos[115]);}
			if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){offsetX=parseInt(pos[116]);offsetY=parseInt(pos[117]);}
			if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){offsetX=parseInt(pos[118]);offsetY=parseInt(pos[119]);}
			//alert("X:"+offsetX +"Y:" +offsetY);
		}
	}
}

var pos=new Array(    800,600,1024,768,1152,864,1280,720,1280,768,1280,800,1280,960,1280,1024,  		// win-ie 800x600;1024x768;1152x864;1280x720;1280x768;1280x800;1280x960;1280x1024;
				  	  800,600,1024,768,1152,864,1280,720,1280,768,1280,800,1280,960,1280,1024,   	// win-op 800x600;1024x768;1152x864;1280x720;1280x768;1280x800;1280x960;1280x1024;
				      800,600,1024,768,1152,864,1280,720,1280,768,1280,800,1280,960,1280,1024,   	// win-fx 800x600;1024x768;1152x864;1280x720(110,65,60);1280x768;1280x800;1280x960;1280x1024;
				  	  800,600,1024,768,1152,864,1280,720,1280,768,1280,800,1280,960,1280,1024,  	// win-ns 800x600;1024x768;1152x864;1280x720;1280x768;1280x800;1280x960;1280x1024;
				  	  800,600,1024,768,1152,864,1280,720,1280,768,1280,800,1280,960,1280,1024,   	// win-mz 800x600;1024x768;1152x864;1280x720

				      800,600,1024,768,1152,864,1280,720,		// mac-ie 800x600;1024x768;1152x864;1280x720
					  800,600,1024,768,1152,864,1280,720,            			// mac-op 800x600;1024x768;1152x864;1280x720
				      800,600,1024,768,1152,864,1280,720,   		// mac-fx 800x600;1024x768;1152x864;1280x720
					  800,600,1024,768,1152,864,1280,720, 	    	// mac-ns 800x600;1024x768;1152x864;1280x720
					  800,600,1024,768,1152,864,1280,720,
					  1280,1280,1280);     						// mac-sf 800x600;1024x768;1152x864;1280x720
	setPos(pos);
