	/*<![CDATA[*/
	function IEHoverPseudo() {

		var navItems = document.getElementById("primary-nav").getElementsByTagName("li");
		
		for (var i=0; i<navItems.length; i++) {
			if(navItems[i].className == "menuparent") {
				navItems[i].onmouseover=function() { this.className += " over"; }
				navItems[i].onmouseout=function() { this.className = "menuparent"; }
			}
		}

	}
	window.onload = IEHoverPseudo;
	window.onLoad=preloadNavImages();
	/*]]>*/

var preloadFlag = true;

function changestyle(objRow,className) {
	document.getElementById(objRow).className=className;
}

function flowOver(name) {
	changestyle("flow_"+name,"flow_"+name+"_fish");
}

function flowOff(name) {
	changestyle("flow_"+name,"flow_"+name);
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function preloadNavImages() {
	if (document.images) {
		nav_01_plan = newImage("/elements/images/flow/flow_01_plan_fish.jpg");
		nav_02_approve = newImage("/elements/images/flow/flow_02_approve_fish.jpg");
		nav_03_design = newImage("/elements/images/flow/flow_03_design_fish.jpg");
		nav_04_approve = newImage("/elements/images/flow/flow_04_approve_fish.jpg");
		nav_05_build = newImage("/elements/images/flow/flow_05_build_fish.jpg");
		nav_06_approve = newImage("/elements/images/flow/flow_06_approve_fish.jpg");
		nav_07_host = newImage("/elements/images/flow/flow_07_host_fish.jpg");
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

function disguise() {
    var ary=disguise.arguments;
    for(a=0;a<ary.length;a++) {
        var name=ary[a];
        if (hasDom) {
            var lyrStyle=document.getElementById("lyr_"+name).style;
            lyrStyle.display="none";
        }
    }
}

function reveal() {
	var ary=reveal.arguments;
    for(a=0;a<ary.length;a++) {
		var name=ary[a];
        if (hasDom) {
			var lyrStyle=document.getElementById("lyr_"+name).style;
			lyrStyle.display="block";
        }

    }
}



/* Ultimater's edited version of:
   http://jibbering.com/2002/4/httprequest.html
   to serve IE7 with XMLHttpRequest instead of ActiveX */

var xmlhttp=false;
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
 	try {
 		 xmlhttp = new XMLHttpRequest();
 	} catch (e) {
 		 xmlhttp=false;
 	}
}

// Don't delete this, back supports IE
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
if (!xmlhttp){
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
}
@end @*/

if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}

/* Ultimater's edited version of:
   http://javascript.internet.com/ajax/ajax-navigation.html */

var please_wait = "Please wait...";

function open_url(url, targetId) {
  if(!xmlhttp)return false;
    var e=document.getElementById(targetId);if(!e)return false;
    
    var d = new Date();
	var tm=d.getDate() + d.getHours() + d.getMinutes() + d.getMilliseconds();
	// Check to see if there is a ? in the url, then add a timestamp
	if ( url.search(/\?/)<0 ) { url += '?tm='+tm	 }
	else { url += '&tm='+tm }
    
    if(please_wait)e.innerHTML = please_wait;
    xmlhttp.open("GET", url, true);
    xmlhttp.onreadystatechange = function() { response(url, e); }
    try{
      xmlhttp.send(null);
    } catch(l) {
    while(e.firstChild)e.removeChild(e.firstChild);//e.innerHTML="" the standard way
    e.appendChild(document.createTextNode("request failed"));
  }
}

function response(url, e) {
  if(xmlhttp.readyState != 4)return;
    var tmp= (xmlhttp.status == 200 || xmlhttp.status == 0) ? xmlhttp.responseText : "Ooops!! A broken link! Please contact the webmaster of this website ASAP and give him the following error code: " + xmlhttp.status+" "+xmlhttp.statusText;
    var d=document.createElement("div");
    d.innerHTML=tmp;
    setTimeout(function(){
      while(e.firstChild)e.removeChild(e.firstChild);//e.innerHTML="" the standard way
      e.appendChild(d);
    },10)
}


//remove the search value
function remove_search_value(searchbox_id,searchbox_default_value) {
	if(document.getElementById(searchbox_id).value == searchbox_default_value){
		document.getElementById(searchbox_id).value = "";
	}
}
//repopulate search box if no text was entered
function repopulate_search_value(searchbox_id,searchbox_default_value) {
	if(document.getElementById(searchbox_id).value == ""){
		document.getElementById(searchbox_id).value = searchbox_default_value;
	}
}




function check_terms_and_conditions(elm){
	if(document.getElementById(elm).checked){
		return true;
	} else {
		alert('Please accept the terms and conditions to continue.');
		return false;
	}
	
}