function CheckCh (e) {

	var ev = e ? e : event;

	var key = ev.which ? ev.which : ev.keyCode;

	

	switch (key){

	case 8:  break;

	case 48: break;

	case 49: break;

	case 50: break;

	case 51: break;

	case 52: break;

	case 53: break;

	case 54: break;

	case 55: break;

	case 56: break;

	case 57: break;

	case 37: break;

	case 38: break;

	case 39: break;

	case 40: break;

	default: 

	ev.returnValue = false;

	if (ev.preventDefault) ev.preventDefault ();

	return false;

	}

	

}



function popupPicts(pictURL, title) {

	theURL = "../php/popup.php?pictURL="+pictURL+"&title="+title;

	new_win = window.open(theURL, 'popup', 'width=200, height=200, location=no, menubar=no, scrollbars=yes, resizable=no, toolbar=no, statusbar=yes');

	return;

}



function trim(str){



 while (str.substring(0,1) == ' ')

  str = str.substring(1, str.length);



 while (str.substring(str.length-1, str.length) == ' ')

  str = str.substring(0,str.length-1);



 return str;

}

function switchDiv(strDivName,bolVisible){

	objElement = document.getElementById(strDivName);

	if(!bolVisible) {

		objElement.style.visibility = "hidden";

	}

	else {

		objElement.style.visibility = "visible";

   }

}