// JavaScript Document for Ray Engineers, P.S.C.

// Popup Message - e.g. <body onclick="popMsg('messsahe')">
function popMsg(msg) {
  alert(msg);
}

// Search function
function raysearch(site_Form) {
	var results_location = "http://rayae.com/results.php";
	if (site_Form.d.value.length > 0) {
		document.cookie = 'd=' + escape(site_Form.d.value) + '; path=/';
		document.cookie = 'n=0; path=/';
		window.location = results_location;
	}
}

function search(selectedtype) {
  document.searchform.submit() ;
}

// Language Navigator Show or Hide - e.g. <div id="langnav1" onMouseOver="showLangNav(6);" onMouseOut="hideLangNav(6);"></div>
function showLangNav(thisitem) {
	var divname = "langnav"+thisitem;
	var thediv = document.getElementById(divname);
	thediv.style.visibility = 'visible';
}
	
function hideLangNav(thisitem) {
	var divname = "langnav"+thisitem;
	var thediv = document.getElementById(divname);
	thediv.style.visibility = 'hidden';
}

// Language control Function
function langchange(selectedtype) {
  document.language.submit() ;
}


// Image Manipulation
function fieldover(thisitem) {
  	var thefield = document.getElementById(thisitem);
	thefield.style.border='5px #FF0000';
}