function openPopup(URLStr,width,height) {
	var popUpWindow=0;
	if (popUpWindow) {
		if (!popUpWindow.closed) popUpWindow.close();
	}
	if (width == 0 || width > screen.width)
		width = screen.width;
	if (height == 0 || height > (screen.height - 100))	
		height = screen.height - 100;
	left = screen.width/2-(width/2);
	top = screen.height/2-(height/2);
	popUpWindow = open(URLStr, 'popUpWindow', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=yes,copyhistory=no,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
	popUpWindow.focus();
}
function changeElementClass(element,newClass) {
	document.getElementById(element).className=newClass; 
}
function setNormClass() {
	if (this.className != 'input_focus')
		this.className='input'; 
}
function resetNormClass() {
	this.className='input'; 
}
function setHoverClass() {
	if (this.className != 'input_focus')
		this.className='input_hover'; 
}
function setFocusClass() {
	this.className='input_focus'; 
}
function setButtonHoverClass() {
	this.className='button_hover'; 
}
function setButtonClass() {
	this.className='button'; 
}
function renderMouseEffects() {
	var inputTags = document.getElementsByTagName("input");
	var selectTags = document.getElementsByTagName("select");
	var textareaTags = document.getElementsByTagName("textarea");
	for (var i=0; i<inputTags.length; i++) {
		var inputType = inputTags[i].getAttribute('type');
		var inputId   = inputTags[i].getAttribute('id');
		if (inputId != "search_input" && inputId != "search_submit") {
			if (inputType == "text" || inputType == "password") {
				inputTags[i].onmouseover = setHoverClass;
				inputTags[i].onmouseout = setNormClass;
				inputTags[i].onfocus = setFocusClass;
				inputTags[i].onblur = resetNormClass;
			} else if (inputType == "submit" || inputType == "reset" || inputType == "button") {
				inputTags[i].onmouseover = setButtonHoverClass;
				inputTags[i].onmouseout = setButtonClass;
				inputTags[i].onfocus = setButtonHoverClass;
				inputTags[i].onblur = setButtonClass;
			}
		}	
	}
	for (var i=0; i<selectTags.length; i++) {
		selectTags[i].onmouseover = setHoverClass;
		selectTags[i].onmouseout = setNormClass;
		selectTags[i].onfocus = setFocusClass;
		selectTags[i].onblur = resetNormClass;
	}
	for (var i=0; i<textareaTags.length; i++) {
		textareaTags[i].onmouseover = setHoverClass;
		textareaTags[i].onmouseout = setNormClass;
		textareaTags[i].onfocus = setFocusClass;
		textareaTags[i].onblur = resetNormClass;
	}
}