function changeLang() {

	var pageNo = document.getElementById('languages').options[document.getElementById('languages').selectedIndex].value;

	if (pageNo != "") {
		var url = "page.php?page_id="+pageNo;
		location.href = url;
	}
}
function hideAt() {
	var fieldValue = document.getElementById("email").value;
	if (fieldValue == "@") {
		document.getElementById("email").value = "";
	}
}
function showAt() {
	var fieldValue = document.getElementById("email").value;
	if (fieldValue == "") {
		document.getElementById("email").value = "@";
	}
}
var picsPath = "pics/";
function over(brand) {
	document.getElementById(brand).src=picsPath+"brands_"+brand+"_active.png";
}
function out (brand) {
	document.getElementById(brand).src=picsPath+"brands_"+brand+".png";
}
function ntInit() {
	ns4=(document.layers)?true:false;
	ns6=(document.getElementById&&!document.all)?true:false;
	ie4=(document.all&&!document.getElementById)?true:false;
	ie5=(document.getElementById)?true:false;
	browserName = navigator.appName;
	browserVer = navigator.appVersion.substring(0,1);
}
function windowOpener(url,width,height,name,scrollers) {
	ntInit();
	if (width==null) {width=400;}
	if (height==null) {height=400;}
	if (name==null) {name="globaltPopup"}
	var topPx = (browserName=="Netscape").php?"screenX":"top";
	var leftPx = (browserName=="Netscape").php?"screenY":"left";
                var winl = (screen.width - width) / 2;
                var wint = (screen.height - height) / 2;
	if (browserName != "Netscape" || browserVer != 2) {
		controlWindow=window.open( url,name,"toolbar=no,height="+height+",width="+width+",location=no,directories=no,status=no,menubar=no,scrollbars="+scrollers+",resizable=no,"+leftPx+"="+winl+","+topPx+"="+wint+"");
	}
}
function hideText (id, text, defaulttext) {
	if (text == defaulttext) {
		document.getElementById(id).value = '';
	}
}

/* Language select */

function languageHideAll() {
    $('#languageSelection li').hide();
    $('#languageSelection .active').show(); 
}

$(document).ready(function() {
    languageHideAll();
    $('#languageSelection').hover(
      function () {
        $('#languageSelection li').show();
        $('#languageSelection li.active').addClass('activeOpen');
      }, 
      function () {
        languageHideAll();
        $('#languageSelection li.active').removeClass('activeOpen');
      }
    );
    $('.printButton a').click(function () {
        window.print();
    });
});