<!--

var TimeOut=300;
agent = navigator.userAgent

function XY(str){

	if(agent.indexOf("MSIE") != -1) 
	{
	  if (str != '') {	
	  	  document.all['maestro'].innerText = 'Maestro: '+str;
	  } else {
		  document.all['maestro'].innerText = '';
	  }
	  
	}
	else if(agent.indexOf("Gesko") != -1) 
	{
	
	  if (str != '') {	
	  	  document.getElementById("maestro").innerHTML = 'Maestro: '+str;
	  } else {
		  document.getElementById("maestro").innerHTML = '';
	  }
	
	}

}
function check(name,id){
		o = document.getElementById(id);
		o.checked = true;
	
}

function check_uncheck(name,id,state){
//		eval('document.form1.'+name+'["'+id+'"]'+'.checked='+state+';')
		eval('document.form1.elements["'+name+'['+id+']"].checked ='+state+';');
		
}

function check_uncheck2(name,state){
//		eval('document.form1.'+name+'["'+id+'"]'+'.checked='+state+';')
		eval('document.form1.elements["'+name+'"].checked ='+state+';');
		
}

function install_element(val, type_val, name_val) {
	var gend=val; 
	var obj = document.form1;
	
	var i = 0;
	if (gend != '') {
		while (obj.elements[i]){
           if ((obj.elements[i].type == type_val) && (obj.elements[i].name == name_val) ){
              if (obj.elements[i].value == gend)
              obj.elements[i].click();
           }

           ++i;
        }
	}
}



function wopen_full(url){
	
	
	nw=window.open('','win','');
	
	nw.location=url;
}

function wopen(url){
	
	var vleft = Math.round(window.screen.width/2-276);
	var vtop = Math.round(window.screen.height/2-250);
	nw=window.open('','mywin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=553,height=500,top='+vtop+',left='+vleft);
	//nw=window.open('','mywin','');
	nw.location=url;
}

function wopen_big(url, w, h){
  if(document.recent_active != 1){
	var vleft = Math.round(window.screen.width/2-w/2);
	var vtop = Math.round(window.screen.height/2-h/2);
	document.recent_active = 1;
	nw=window.open(url,'mywin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+w+',height='+h+',top='+vtop+',left='+vleft);
//	nw.location=url;
  }
}

function wopen_big2(url, w, h){
	var vleft = Math.round(window.screen.width/2-w/2);
	var vtop = Math.round(window.screen.height/2-h/2);
	document.recent_active = 1;
	nw=window.open(url,'mywin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+w+',height='+h+',top='+vtop+',left='+vleft);
//	nw.location=url;
}

function wopen_big1(url, w, h, scroll){


  if(document.recent_active != 1){
	var vleft = Math.round(window.screen.width/2-w/2);
	var vtop = Math.round(window.screen.height/2-h/2);
	document.recent_active = 1;
	nw=window.open(url,'mywin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+scroll+',resizable=no,copyhistory=no,width='+w+',height='+h+',top='+vtop+',left='+vleft);
//	nw.location=url;
  }
}

function form_submit(url){
	var form = document.form1;
	if (url) {
		form.action=url;
	}
	form.submit();
}

function test_order(form) {
	
	if (isNaN(form.value)) {
		window.alert("Invalide type"+".");
        form.select();
        form.focus();
        return false;
	} else if (form.value <= 0) {
		window.alert("Invalide type"+".");
        form.select();
        form.focus();
        return false;
	} else {
		form.value = Math.round(form.value);
	}
}

function test_postal_code(form) {
	
   
    var pattern=/[^0-9]/;
    if (pattern.test(form.value)) {
        window.alert('Please type in valid code');
        form.focus();
        form.select();
        return false;
        
     }   
   
}

function wpopup(url, name, rwidth, rheight) {
	swidth=screen.width;
	sheight=screen.height;
	vleft=Math.round((swidth - rwidth) / 2);
	vtop=Math.round((sheight - rheight) / 2);
	window.open(url, name, 'width='+rwidth+',height='+rheight+',left='+vleft+',top='+vtop);
}

function wscrollpopup(url, name, rwidth, rheight) {
	swidth=screen.width;
	sheight=screen.height;
	vleft=Math.round((swidth - rwidth) / 2);
	vtop=Math.round((sheight - rheight) / 2);
	window.open(url, name, 'width='+rwidth+',height='+rheight+',left='+vleft+',top='+vtop+',scrollbars=yes');
}


//-->