﻿var Browsers = navigator.userAgent.toLowerCase();
NS  = ( (Browsers.indexOf('mozilla')!=-1) && ( (Browsers.indexOf('spoofer')==-1) && (Browsers.indexOf('compatible') == -1) ) );
NS_std = ( (document.getElementById) && (!document.all) && (Browsers.indexOf("opera") == -1) );
IE = ( (Browsers.indexOf("msie") != -1) && (Browsers.indexOf("opera") == -1) );
OP = (Browsers.indexOf("opera") != -1);
stdBrowser=(document.getElementById) ? true : false;
obj=(document.images);
var Existing = false , MainID = null;
var HideLater=setTimeout("null",1);
var catWindow = null , Counter = 0;
var preWindow = new Array();

//**************** Rollover ****************\\

function Mouseover(){
	if(obj){
		var i=0;
		while(i<Mouseover.arguments.length){
			document[Mouseover.arguments[i]].src = (Mouseover.arguments[i+1]=="jpg") ? (""+Path+"images/" + Mouseover.arguments[i] + "_on.jpg") : (""+Path+"images/" + Mouseover.arguments[i] + "_on.gif");
			i+=2;
		}
	}
}

function Mouseout(){
	if(obj){
		var i=0;
		while(i<Mouseout.arguments.length){
			document[Mouseout.arguments[i]].src = (Mouseout.arguments[i+1]=="jpg") ? (""+Path+"images/" + Mouseout.arguments[i] + ".jpg") : (""+Path+"images/"+Mouseout.arguments[i]+".gif");
			i+=2;
		}
	}
}

//**************** End Rollover ****************\\

//**************** Build Begining tag ****************\\

function position_ly(){
	if(IE || OP){
		var newMargin=( document.body.offsetWidth-1024 > 0 ) ? (Math.ceil( (document.body.offsetWidth-1000) / 2 ) ) : 0;
	}
	else if(NS_std){
		var newMargin=(document.width-1024 >0 ) ? ( Math.ceil( (document.width-1000) / 2 ) ) : 0;
	}
	var Left = (position_ly.arguments[2]+newMargin) , Top = position_ly.arguments[1];
	var Width = (position_ly.arguments[3]!=null) ? (position_ly.arguments[3]+'px') : 'auto' ; Height = (position_ly.arguments[4]!=null) ? (position_ly.arguments[4]+'px') : 'auto' ;  ZIndex = (position_ly.arguments[5]!=null) ? position_ly.arguments[4] : 2;
	MainID=position_ly.arguments[0];
	if( screen.width > 1024 && MainID=="divBody" ){
		document.write("<div id=\""+MainID+"\" style=\"position:absolute;top:"+Top+"px;left:"+Left+"px;width:"+Width+";height:"+Height+";border:1px solid #337f00;z-index:"+ZIndex+";\">");
	}
	else{
		document.write("<div id=\""+MainID+"\" style=\"position:absolute;top:"+Top+"px;left:"+Left+"px;width:"+Width+";height:"+Height+";z-index:"+ZIndex+";\">");
	}
	Existing=true;
}


//**************** End Build Begining tag ****************\\

//**************** Position Layer ****************\\


function styObject(nLayer , number){
	if(stdBrowser&&document.getElementById(nLayer)) {document.getElementById(nLayer).style.left = number + "px";}
	else if(IE&&document.all[nLayer]) {document.all[nLayer].style.pixelLeft = number;}
}



function posLayer(){
	var number = 0;
	if(IE || OP) {
		var newLeft=( document.body.offsetWidth-1024 > 0 ) ? (Math.ceil( (document.body.offsetWidth-1000) / 2 ) ) : 0;
	}
	else if(NS_std) {
		var newLeft=(document.width-1024 >0 ) ? ( Math.ceil( (document.width-1000) / 2 ) ) : 0;
	}
	if(Existing){
		if(screen.width <= 1024){
			if( MainID=="divBody" ){
				if(stdBrowser) {document.getElementById(MainID).style.border = '0px';}
				else if(IE) {document.all[MainID].style.border = '0px';}
			}
			styObject( MainID , newLeft) ;
		}
		else if(screen.width > 1024){
			if( MainID=="divBody" ){
				if(stdBrowser) {document.getElementById(MainID).style.border = '1px solid #00337f';}
				else if(IE) {document.all[MainID].style.border = '1px solid #00337f';}
			}
			styObject( MainID , newLeft );
		}
	}
}

window.onresize = posLayer;

//**************** End Position Layer ****************\\

//**************** New Windows ****************\\



