/*
*	$Source: /sezame/cda_aci/js/rgis_util.js,v $ 
*	$Revision: 1.1 $
*	$Author: jlinares $
*	$Date: 2007/02/26 09:19:13 $
*	$Name: 1.1.1.1 $
*	
*	Copyright © 2002 Arob@ze Sarl - Geneva. All rights reserved
*/

<!--
function openImageWindow(name) {
	fenster = window.open(name,'','toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=0,resizable=1,width=500,height=400,top=200,left=300');	
	fenster.focus();
}
	
function openNewWindow(name) {
	fenster = window.open(name,'Zielfenster','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1');
}
function printWindow(name) {
	fenster = window.open(name,'Zielfenster','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=680,height=550,top=150,left=200');
	fenster.focus();
}
function sendWindow(name) {
	fenster = window.open(name,'Zielfenster','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=330,height=280,top=250,left=300');
	fenster.focus();
}
function newWindow(name, width, height) {
	fenster = window.open(name,'Zielfenster','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width='+width+',height='+height+',top=150,left=200');
	fenster.focus();
}

function checkSearchParam(form, minRequiredParam, errMsg) {
	searchParamCount = 0;

	for(j=0;j<form.elements.length;j++){
		el = form.elements[j];
		elType = el.type;
		
		if( elType != 'hidden' && elType != 'submit' ){
		
			if(elType == 'checkbox'){
				if(el.checked)searchParamCount++;				
			}else if(elType == 'select-one'){
				value = el.value;
				if(value >= 0 )searchParamCount++;				
			}else if(elType == 'text'){
				value = el.value;				
				if( value.length > 0)searchParamCount++;
			}
		}
	}	
	if(searchParamCount >= minRequiredParam )return true;
	else{
		alert(errMsg);
		return false;
	}
}
function submitenter(myfield,e)
{
	var keycode;
	if (window.event) keycode = window.event.keyCode;
	else if (e) keycode = e.which;
	else return true;
	
	if (keycode == 13)
	   {
	   myfield.form.submit();
	   return false;
	   }
	else
	   return true;
}


//Disable link in print & send window except the open printer links
function disableLink(){
	var aLinks = document.links;
	for(i=0; i<aLinks.length; i++){
		var link = aLinks[i];
		if(link.id != "printLink")link.href = '#';
	}
}	

function startList() {
		if (document.all&&document.getElementById) {
			navRoot = document.getElementById("nav");
			for (i=0; i<navRoot.childNodes.length; i++) {
				node = navRoot.childNodes[i];
				if (node.nodeName=="LI") {
					node.onmouseover=function() {
						this.className+=" over";
					}
					node.onmouseout=function() {
						this.className=this.className.replace(" over", "");
					}
				}
			}
		}
	}
	
	
function submitSearch(){		
	form = document.forms['SearchForm'];
	form.submit();
}

function onLoad(){
	startList();		
	if( typeof(error) != 'undefined' ){
		alert(error);
	}
}
//-->