<!--

function OpenWindow(theElement,width,height,sroll){
	var objWnd = window.open(theElement.href,"Detail","scrollbars=" + sroll + ",resizable=yes,height=" + height + ",width=" + width + ",left=0,top=0");
	objWnd.focus();
}

function NewWindow(strURL){
	var objWnd = window.open(strURL);
	objWnd.focus();
}

function PrintWindow(strURL){
	var objWnd = window.open(strURL,"Print","menubar=yes,scrollbars=yes,resizable=yes,height=860,width=710,left=0,top=0");
	objWnd.focus();
}

function DemandWindow(theElement){
	var objWnd = window.open(theElement.href,"Demand","menubar=yes,scrollbars=yes,resizable=yes,height=660,width=710,left=0,top=0");
	///height=860
	objWnd.focus();
}

function Trim(s){
	while(s.substring(0,1) == ' '){
		s = s.substring(1,s.length);
	}
	while(s.substring(s.length-1,s.length) == ' '){
		s = s.substring(0,s.length-1);
	}
	return s;
}

function CheckEmptyField(sField){
	var sMsg = '';
	var oLabel = document.getElementById('lb' + sField);
	if(Trim(document.getElementById(sField).value) == ""){
		document.getElementById(sField).focus();
		if(oLabel){
			sMsg = oLabel.firstChild.data;
			if(sMsg.substring(sMsg.length - 1, sMsg.length) == ':') sMsg = sMsg.substring(0, sMsg.length-1)
			oLabel.style.color = 'red';
		}
		else sMsg = '';
		alert(sCheckEmptyField + sMsg + ".");
		return false;
	}
	else{
		if(oLabel) oLabel.style.color = '';
		return true;
	}
}

function SearchInfoValidate(){
	var search = Trim(document.getElementById('sl').value);	
	if(search == "" || search.length < 2){
		alert(sCheckSearchField);
		return false;	
	}
	return true;
}

//-->