

 
var winW = 630, PageW = 790; 
var getPos;
//get the browser
var browserName = whichBrs(); 

//document.write(browserName);

function getPosition() {

if (parseInt(navigator.appVersion)>3) {
 if (navigator.appName=="Netscape") {
  winW = window.innerWidth;
  getPos =  PageW + ((winW - PageW)/2);
 }
 if (navigator.appName.indexOf("Microsoft")!=-1) {
  winW = document.body.offsetWidth;
  getPos =  PageW + ((winW - PageW)/2);
 }
 else {
   winW = document.body.offsetWidth;
  getPos =  PageW + ((winW - PageW)/2);
 }
return (getPos);
}

}


getPosition();


var imagewidth=200;
var imageheight=130;
var bgimage=new Image(imagewidth,imageheight);
var bgimage_backup=new Image(imagewidth,imageheight);

var logolink="";
var alttext="";
var visibleduration=0;
var Hoffset;
var Voffset;
var temph;


function setupLocation(){
	temph = getPosition();
	bgimage = new Image;
	if (getPos < 950) {
		imagewidth=200;
		imageheight=200;
		
		if (browserName=="Internet Explorer"){
			bgimage.src="images/dropbox4.png";
			Hoffset = getPos - 213;
			Voffset = 135;
		}
		if (browserName=="Firefox" ){
		    bgimage.src="images/dropbox4.png";
			Hoffset = getPos - 197;
			Voffset = 158;
		}
		if (browserName=="Safari") {
			bgimage.src="images/dropbox4.png";
			Hoffset = getPos - 196;
			Voffset = 155;
						
		}
		if (browserName=="Opera") {
			bgimage.src="images/dropbox4.png";
			imagewidth=200;
		    imageheight=200;
			Hoffset = getPos - 210;
			Voffset = 175;
						
		}
	
		}
	if (getPos > 949) {
			imagewidth=200;
            imageheight=130;
			if (browserName=="Internet Explorer"){
			bgimage.src="images/dropbox5.png";
			Hoffset=getPos - 16;
			Voffset=100;
			
			}
			if (browserName=="Firefox"){
			bgimage.src="images/dropbox5.png";
			Hoffset=getPos;
			Voffset=120;

			}
			if (browserName=="Safari"){
			bgimage.src="images/dropbox5.png";
			Hoffset=getPos;
			Voffset=118;

			}
			if (browserName=="Opera") {
			bgimage.src="images/dropbox5.png";
			Hoffset=getPos -14;
			Voffset=135;
	
			}
		}
}
setupLocation();

var ie=document.all&&navigator.userAgent.indexOf("Opera")==-1

var menu_obj=ie? document.all.loginmenu : document.getElementById? document.getElementById("loginmenu") : document.loginmenu


function insertimage(){

//if (ie||document.getElementById){
if (browserName=="Internet Explorer"){
		menu_obj.innerHTML='<table background="'+bgimage.src+'" style="background-repeat:no-repeat" width="'+imagewidth+'" height="'+imageheight+'" border="0" cellpadding="0"><tr><td align="left"><label style="font-size:12px; margin-left:25px">Account Name:</label><br><input style="width:130px;height:15px; margin-left:25px" name="loginid" /><br><br><input style="margin-left:65px" type="submit" name="login_but" value="Login" /><br></td></tr></table>';
}
//else if (document.layers){
if (browserName=="Firefox"){
menu_obj.innerHTML='<table background="'+bgimage.src+'" style="background-repeat:no-repeat"  width="'+imagewidth+'" height="'+imageheight+'" border="0" cellpadding="0"><tr><td align="left"><label style="font-size:12px; margin-left:25px">Account Name:</label><br><input style="width:130px;height:15px; margin-left:25px" name="loginid" /><br><br><input style="margin-left:65px" type="submit" name="login_but" value="Login" /><br></td></tr></table>';
}
if (browserName=="Safari"){
menu_obj.innerHTML='<table background="'+bgimage.src+'" style="background-repeat:no-repeat"  width="'+imagewidth+'" height="'+imageheight+'" border="0" cellpadding="0"><tr><td align="left"><label style="font-size:12px; margin-left:25px">Account Name:</label><br><input style="width:130px;height:15px; margin-left:25px" name="loginid" /><br><br><input style="margin-left:65px" type="submit" name="login_but" value="Login" /><br></td></tr></table>';
}
if (browserName=="Opera"){
menu_obj.innerHTML='<table background="'+bgimage.src+'" style="background-repeat:no-repeat"  width="'+imagewidth+'" height="'+imageheight+'" border="0" cellpadding="0"><tr><td align="left"><label style="font-size:12px; margin-left:25px">Account Name:</label><br><input style="width:130px;height:15px; margin-left:25px" name="loginid" /><br><br><input style="margin-left:65px" type="submit" name="login_but" value="Login" /><br></td></tr></table>';
}
}

function positionit(){
getPosition();
setupLocation();
if (browserName=="Internet Explorer"){
menu_obj.style.left=Hoffset+5; /*parseInt(dsocleft)+5+Hoffset*/
menu_obj.style.top=Voffset+63;/*parseInt(dsoctop)+5+Voffset*/

}
if (browserName=="Firefox"){
menu_obj.style.left=(Hoffset-14) + "px";
menu_obj.style.top= Voffset+25 + "px";


}
if (browserName=="Safari"){
menu_obj.style.left=(Hoffset-14) + "px";
menu_obj.style.top= Voffset +30 + "px";
}
if (browserName=="Opera"){
menu_obj.style.left=Hoffset + 'px';
/*parseInt(dsocleft)+5+Hoffset*/
menu_obj.style.top=Voffset+25 + 'px';
}

}

function hideloginbox(){
	if (browserName=="Firefox" || "Safari"){
		menu_obj.style.visibility="hidden";
	}
	else if (browserName=="Internet Explorer"){
		menu_obj.style.visibility="hidden";
	//clearInterval(_menuinterval);
	}
	else {
		menu_obj.style.visibility="hidden";
	}
}

	
function toggleVisibility(me){
		positionit();
		if (me.style.visibility=="hidden"){
			me.style.visibility="visible";
			//me.fadeIn("slow");
			//myHorizontalSlide.slideIn();
		}
		else {
			me.style.visibility="hidden";
			//myHorizontalSlide.slideOut();
		}
}


function being_menu(){
toggleVisibility(menu_obj);
positionit();  
insertimage();

}



if (ie||document.getElementById||document.layers){
window.onload = being_menu;
}






// --------------------------------------------------------------------------
// animation stuff
// --------------------------------------------------------------------------

