function getPage(page) {
document.location.href=page;
}




function orderList(p, sp,listtype) {

if(listtype == document.getElementById("listOrder").value) listtype = listtype+"b";

document.location.href = "index.php?p="+p+"&sp="+sp+"&o="+listtype;

}


window.onload = function() {
setLayout();
}
	
	
var myWidth = 0, myHeight = 0;
 
function setLayout() {

 
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
		
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
			
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;

  }
	
	
	if(myWidth < 1024) {
	document.getElementById("logo").style.marginLeft = -479;
	} else {
	document.getElementById("logo").style.marginLeft = -500;
	}
	
	
 

	
}





























	 
	
function openAlert(type, title, text) {

var fadeOut = document.getElementById("fadeOut2");
var alertBox = document.getElementById("alertBox");

switch(type) {
case "1":
var logo = "<div style=\"float:left;margin-right: 4px\"><img src=\"images/exclamation.png\"width=\"16\" height=\"16\" /></div>";
var color = "Red";
var borderColor = "#d6301f";
var textColor = "0xd6301f";
break;
case "2":
var logo = "<div style=\"float:left;margin-right: 4px\"><img src=\"images/shield.png\"width=\"16\" height=\"16\" /></div>";
var color = "Red";
var borderColor = "#d6301f";
var textColor = "0xd6301f";
break;
case "3":
var logo = "<div style=\"float:left;margin-right: 4px\"><img src=\"images/shield.png\"width=\"16\" height=\"16\" /></div>";
var color = "Blue";
var borderColor = "#2166d7";
var textColor = "0x2166d7";
break;
case "4":
var logo = "<div style=\"float:left;margin-right: 4px\"><img src=\"images/shield.png\"width=\"16\" height=\"16\" /></div>";
var color = "Black";
var borderColor = "#000";
var textColor = "0x000000";
break;
case "5":
var logo = "<div style=\"float:left;margin-right: 4px\"><img src=\"images/information.png\"width=\"16\" height=\"16\" /></div>";
var color = "Grey";
var borderColor = "#666";
var textColor = "0x000000";
break;

}


alertBox.style.borderColor = borderColor;

alertBox.childNodes[0].childNodes[0].innerHTML = "<div style=\"padding-top: 5px;padding-left: 5px\" class=\"flashHeadSmall3\" title=\""+textColor+"\">"+title+"</div>";
alertBox.childNodes[1].childNodes[0].innerHTML = text;

fadeOut.className="show";


alertBox.className="show";
//openAlert2 = new OpacityTween(alertBox,Tween.StrongEaseOut, 0, 100, 0.5);
//openAlert3 =  new Tween(alertBox.style,'top',Tween.StrongEaseIn,0,50,0.5,'%');
//openAlert2.start();
//openAlert3.start();


}



			 
			 
			 
function closeAlert() {

var fadeOut = document.getElementById("fadeOut2");
var alertBox = document.getElementById("alertBox");


alertBox.className="hidden";
fadeOut.className="hidden";



}
			 	









function enablePass(objectt) {
document.getElementById("pass2").className='show';
document.getElementById("pass1").className='hidden';
document.getElementById("passField2").value = "";
document.getElementById("passField2").focus();

}



function disablePass(objectt) {
if(objectt.value ==  "" ) {
document.getElementById("pass2").className='hidden';
document.getElementById("pass1").className='show';
}
}







