function openPopUp(url, name, x, y, t, l){
	var newWin = window.open(url, name,'status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=1,height=' + y + ',width=' + x + ',top=' + t + ',left=' + l);
}
function openUserPopUp(url){
	openPopUp(url,'',400,520,20,100);
}
function openSmallPopUp(url){
	openPopUp(url,'smallPop',480,420,50,100);
}
function changeCountry(){
	var tag = getTag("selCountry");
	var country_id = "1";
	
	if(tag!=null){
		country_id = getSelectedValue(tag);
	}
	
	window.location.href = "/default.asp?c=" + country_id;
	
}
function openFlexPopUp(url, name, x, y, t, l){
	var newWin = window.open(url, name,'status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=1,scrollbars=1,height=' + y + ',width=' + x + ',top=' + t + ',left=' + l);
}
function visi(nr)
{
	if (document.all)
	{
		vista = (document.all[nr].style.visibility == 'hidden') ? 'visible'	: 'hidden';
		document.all[nr].style.visibility = vista;
	}
	else if (document.getElementById)
	{
		vista = (document.getElementById(nr).style.visibility == 'hidden') ? 'visible' : 'hidden';
		document.getElementById(nr).style.visibility = vista;

	} 
	else if (document.layers)
	{
		vista = (document.layers[nr].visibility == 'hide') ? 'show' : 'hide'
		document.layers[nr].visibility = vista;
	}
}
function getTag(id){
	if(document.all)			return document.all[id];
	if(document.getElementById) return document.getElementById(id);
	if(document.layers)			return document.layers[id];
	if(document[id])			return document[id];
}
function getStyle(tag){
	if(tag==null) return;
	
	if(tag.style)	return tag.style;
	return tag;
}
function getSelectedValue(tag){
	if(!tag) return null;
	
	if(tag.selectedIndex) return tag[tag.selectedIndex].value;
	if(tag.options) return tag.options[selectedIndex].value;
}
function siteSearch(){    
    var sWeb = getTag("sRadioWeb");
    var txt = getTag("txtSearchTextHeader");
    if(sWeb.checked) {
        var q = getTag("q");
        q.value = txt.value;
        document.frmGoogle.submit();
    } else {
        document.frmSearchHeader.submit();
    }
}
//window onload management
var WindowOnloads = new Array();
window.onload = RunWindowOnloads;
function RunWindowOnloads(){
    for(var i = 0;i < WindowOnloads.length;i++){
        var fnct = WindowOnloads[i];
        fnct.call();
    }
}
function AddWindowOnload(func){
    WindowOnloads[WindowOnloads.length] = func;
}    