

//Refreshes to current selected search page when search button is clicked,
//or opens new window if 'Compare Prices' is selected.
function fncDoSearch(){

	var cmb = document.forms['frmSearch'].search;
	
	//Ignore if already on the selected page.
	if( location.href.indexOf(cmb.value) == -1 ){
	
		//If the selected item is 'Compare Prices', open in a new window.
		if( cmb[cmb.selectedIndex].text.toLowerCase() == "compare prices" ){		
			fncShowPrices();
			return false;
		}
		else{
			document.location.href = cmb.value;
			event.cancelBubble = true;
			return false;	
		}

	}

}

//Opens price comparison into a new window.
function fncShowPrices(){		 
		 var newwin = open("ocm_compareprices.htm", "compare", "top=20,left=20,width=680,height=630");
}


//Set the statusbar value.
function fncStatus(str){

	if( fncStatus.arguments.length != 1 ){
		str = "Welcome to Consumer Prescription Solutions!";
	}
	
	status=str;
	return true;    
}
fncStatus();