var bn=navigator.platform
var ie=navigator.appName
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;

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))
{mz=true;}
else if(bw.indexOf("Netscape")!=-1)
{ns=true;}
else
{op=true;} 

var agt=navigator.userAgent.toLowerCase(); 
if ( navigator.appName == "Netscape" )
{
	marg =(window.innerWidth);
}
else 
{
	marg =(document.body.clientWidth);
}

if ( navigator.appName == "Netscape" )
{
	marg1 =(window.innerHeight);
}
else 
{
	marg1 =(document.body.clientHeight);
}

if (marg<=775)
{
	marg = 775;
}

if ( navigator.appName == "Netscape" )
{
	temp=((marg-775)*0.5)-6;
}
else
{
	temp=((marg-775)*0.5)+1;
}
if (agt.indexOf("msie 5.0")!=-1)
{
	temp=((marg-775)*0.5)-7;
}

if ( temp < 0 ) temp = 2;

temp1 = temp+285;
var Leftpos=temp1;
if(os == "Mac")
	var top1=340;	
else
	var top1=337;	


//alert("leftpos:"+Leftpos);
var scrwidth =(window.screen.width);
var scrheight =(window.screen.height);
//alert(scrwidth)


//subpages
	var pos=new Array(0,
					  618,730,795,860,860,860,860,  		// win-ie 800x600;1024x768;1152x864;1280x720;1280*768;1280*960;1280*1024; 
				      618,730,795,860,860,860,860, 	  		// win-op 800x600;1024x768;1152x864;1280x720;1280*768;1280*960;1280*1024;
				      620,730,795,860,860,860,860,			// win-fx 800x600;1024x768;1152x864;1280x720;1280*768;1280*960;1280*1024; 
				  	  620,730,796,860,860,860,860,			// win-ns 800x600;1024x768;1152x864;1280x720;1280*768;1280*960;1280*1024;
				  	  620,730,796,860,860,860,860,			// win-mz 800x600;1024x768;1152x864;1280x720;1280*768;1280*960;1280*1024;
					   
				      620,620,620,620,						// mac-ie 800x600;1024x768;1152x864;1280x720 
					  620,732,800,860,						// mac-op 800x600;1024x768;1152x864;1280x720 
					  620,732,800,860,							// mac-fx 800x600;1024x768;1152x864;1280x720 
					  620,730,800,860,          				// mac-ns 800x600;1024x768;1152x864;1280x720
				      619,731,800,860,						// mac-sf 800x600;1024x768;1152x864;1280x720 
					  538,472,600,472,		
					  366,472,472,472,538,472,600,472,		
					  366,472,472,472,538,472,600,472,      
					  600,600,600);   									
	setPos(pos);

	function setPos(pos)
	{
		if(os=="Win")
		{
			if(ie)
			{
				if(parseInt(scrwidth)=="800" && parseInt(scrheight)=="600") {Leftpos=parseInt(pos[1]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){Leftpos=parseInt(pos[2]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){Leftpos=parseInt(pos[3]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){Leftpos=parseInt(pos[4]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){Leftpos=parseInt(pos[5]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){Leftpos=parseInt(pos[6]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){Leftpos=parseInt(pos[7]);}
				//alert(Leftpos)
			}
			else if(op)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){Leftpos=parseInt(pos[8]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){Leftpos=parseInt(pos[9]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){Leftpos=parseInt(pos[10]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){Leftpos=parseInt(pos[11]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){Leftpos=parseInt(pos[12]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){Leftpos=parseInt(pos[13]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){Leftpos=parseInt(pos[14]);}
				//alert("X:"+Leftpos+"   Y:"+offsetY);
			}
			else if(fx)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){Leftpos=parseInt(pos[15]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){Leftpos=parseInt(pos[16]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){Leftpos=parseInt(pos[17]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){Leftpos=parseInt(pos[18]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){Leftpos=parseInt(pos[19]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){Leftpos=parseInt(pos[20]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){Leftpos=parseInt(pos[21]);}
				//alert("Leftpos:" +Leftpos +"offsetY:"+offsetY );
			}
			else if(ns)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){Leftpos=parseInt(pos[22]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){Leftpos=parseInt(pos[23]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){Leftpos=parseInt(pos[24]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){Leftpos=parseInt(pos[25]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){Leftpos=parseInt(pos[26]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){Leftpos=parseInt(pos[27]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){Leftpos=parseInt(pos[28]);}
				//alert("Leftpos:" +Leftpos +"offsetY:"+offsetY );
			}
			else if(mz)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){Leftpos=parseInt(pos[29]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){Leftpos=parseInt(pos[30]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){Leftpos=parseInt(pos[31]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="720"){Leftpos=parseInt(pos[32]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="768"){Leftpos=parseInt(pos[33]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){Leftpos=parseInt(pos[34]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="1024"){Leftpos=parseInt(pos[35]);}
				//alert("Leftpos:" +Leftpos +"offsetY:"+offsetY );
			}
		}
		else if(os=="Mac")
		{
			if(ie)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){Leftpos=parseInt(pos[36]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){Leftpos=parseInt(pos[37]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){Leftpos=parseInt(pos[38]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){Leftpos=parseInt(pos[39]);}
				//top1=58;	
				//alert("X:"+Leftpos +"Y:" +offsetY);
				//alert("X:"+Leftpos);
			}
			else if(op)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){Leftpos=parseInt(pos[40]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){Leftpos=parseInt(pos[41]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){Leftpos=parseInt(pos[42]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){Leftpos=parseInt(pos[43]);}
				//alert("X:"+Leftpos);
			}
			else if(fx)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){Leftpos=parseInt(pos[44]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){Leftpos=parseInt(pos[45]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){Leftpos=parseInt(pos[46]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){Leftpos=parseInt(pos[47]);}
				//alert("X:"+Leftpos +"Y:" +offsetY);
			}
			else if(ns)
			{
				
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){Leftpos=parseInt(pos[48]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){Leftpos=parseInt(pos[49]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){Leftpos=parseInt(pos[50]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){Leftpos=parseInt(pos[51]);}
				//alert("X:"+Leftpos +"Y:" +offsetY);
			}
			
			else if(sf)
			{
				if(parseInt(scrwidth)=="800"  && parseInt(scrheight)=="600"){Leftpos=parseInt(pos[52]);}
				if(parseInt(scrwidth)=="1024" && parseInt(scrheight)=="768"){Leftpos=parseInt(pos[53]);}
				if(parseInt(scrwidth)=="1152" && parseInt(scrheight)=="864"){Leftpos=parseInt(pos[54]);}
				if(parseInt(scrwidth)=="1280" && parseInt(scrheight)=="960"){Leftpos=parseInt(pos[55]);}
				//alert("X:"+Leftpos +"Y:" +offsetY);
			}
		}
	}
