var newWindow = null;

function openWindow(contentURL,windowName,windowWidth,windowHeight) {
	widthHeight = 'height=' + windowHeight + ',width=' + windowWidth;
	newWindow = window.open(contentURL,windowName,widthHeight);
	newWindow.focus()
}

function closeWindow() {
	if (newWindow != null)  {	
	 newWindow.close();
	 newWindow = null;
	}
}

function toggleWindow(contentURL,windowName,windowWidth,windowHeight) {
	if (newWindow == null) {
		widthHeight = 'HEIGHT=' + windowHeight + ',WIDTH=' + windowWidth;
		newWindow = window.open(contentURL,windowName,widthHeight);
		newWindow.focus()
	}
	else {	
	 			newWindow.close();
	 			newWindow = null;
	}
}

function menu_onchange(selection) {  
if(selection == "")  
{  
}  
else{  
window.location=selection  
}  
}  

function alternate(id){ 
 if(document.getElementsByTagName){  
   var table = document.getElementById(id);   
   var rows = table.getElementsByTagName("tr");   
   for(i = 1; i < rows.length; i++){           
 //manipulate rows 
     if(i % 2 == 0){ 
       rows[i].className = "even"; 
     }else{ 
       rows[i].className = "odd"; 
     }       
   } 
 } 
}

function removesearchstr() {
    if (document.searchform.Terms.value=="--Search--") {
		document.searchform.Terms.value=""
	}
}
function replacesearchstr(){
	if (document.searchform.Terms.value=="") {
		document.searchform.Terms.value="--Search--"
	}
}

function submitReviewForm() {
    // Change the form action to the real submission page
    document.getElementById('review-form').action = "http://www.hostcentric.com/scripts/formemail.bml";
    // Submit the form
    document.getElementById('review-form').submit();
}