function popUp(link,width,height) {
	prozor = window.open(link, "win", 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+width+',height='+height);
	prozor.focus();
}

		
function checkrequired(which) {
	var errMsg ="";
	if (document.images) {
		if (which.conid.selectedIndex==0) {
			errMsg += "Please choose category.\n";
     }
   }
   
	var valid = "0123456789";

	var temp = "";
	for (var i=0; i<which.from.value.length; i++) {
		temp = "" + which.from.value.substring(i, i+1);
		if (valid.indexOf(temp) == "-1"){ 
			errMsg += "FROM: Only numbers are accepted!\n";
		}
	}

	var temp="";
	for (var i=0; i<which.to.value.length; i++) {
		temp = "" + which.to.value.substring(i, i+1);
		if (valid.indexOf(temp) == "-1"){ 
			errMsg += "TO: Only numbers are accepted!\n";
		}
	}
	
	if (errMsg.length > 0) {
		alert(errMsg);
		return false;
	} else {
		return true;
	}
}


function toggleLayer(whichLayer)
{
	if (document.getElementById)
	{
	// this is the way the standards work
	var style2 = document.getElementById(whichLayer).style;
	style2.display = style2.display? "":"block";
	}
	else if (document.all)
	{
	// this is the way old msie versions work
	var style2 = document.all[whichLayer].style;
	style2.display = style2.display? "":"block";
	}
	else if (document.layers)
	{
	// this is the way nn4 works
	var style2 = document.layers[whichLayer].style;
	style2.display = style2.display? "":"block";
	}
}