//------- Son-Of-Sucker-Fish IE Hack -------//
sfHover = function() {
if (document.getElementById("nav")) {
var sfEls = document.getElementById("nav").getElementsByTagName("LI");
for (var i=0; i < sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=" sfhover";
}
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//------------------- for clearing and replacing text in form input fields and textareas -------------------//

function clearText(thefield) {
  if (thefield.defaultValue==thefield.value) { thefield.value = "" }
} 
function replaceText(thefield) {
  if (thefield.value=="") { thefield.value = thefield.defaultValue }
}
//-------------------------------------------------//
function show(sid,cid)
{
	document.getElementById(sid).style.display='block';
	document.getElementById(cid).className='sel';
}
function hide(sid,cid)
{
	document.getElementById(sid).style.display='none';
	document.getElementById(cid).className='';
}



/* ----------------------- Home Page Sound ------------------------------ */

function sound()
{
	document.getElementById('sound').innerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="0" height="0">' +
  '<param name="movie" value="images/khor-0801-0801-A.swf" />' +
  '<param name="quality" value="high" />' +
  '<embed src="images/khor-0801-0801-A.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="0" height="0"></embed>' +
'</object>';
}



/* --------------------- Free Case Validation  ------------------------- */

function checkvalue()
{
if(document.form1.name.value=="Name*" || document.form1.name.value=="")
{
 alert("Please enter your Name")
 document.form1.name.focus();
return false;
}
else if(document.form1.phone.value=="Phone*" || document.form1.phone.value=="")
{
 alert("Please enter your Phone Number")
document.form1.phone.focus();
return false;
}
else
document.form1.action='mail.php';
document.form1.submit();
}

/* ------------------ Help ------------------------ */
function checkvaluehelp()
{
if(document.form2.fname.value=="First Name*" || document.form2.fname.value=="")
{
 alert("Please enter your First Name")
 document.form2.fname.focus();
return false;
}
else if(document.form2.lname.value=="Last Name*" || document.form2.lname.value=="")
{
 alert("Please enter your Last Name")
document.form2.lname.focus();
return false;
}
else if(document.form2.phone.value=="Phone*" || document.form2.phone.value=="")
{
 alert("Please enter your Phone Number")
document.form2.phone.focus();
return false;
}
else
document.form2.action='mail_help.php';
document.form2.submit();
}
/* =================== Contact ======================= */
function checkcontact()
{
if(document.contform.name.value=="")
{
 alert("Please enter your Name")
 document.contform.name.focus();
return false;
}
else if(document.contform.email.value=="")
{
 alert("Please enter your Email")
document.contform.email.focus();
return false;
}
else if(document.contform.phone.value=="")
{
 alert("Please enter your Phone Number")
document.contform.phone.focus();
return false;
}
else
document.contform.action='mail_contact.php';
document.contform.submit();
}
