<!--//--><![CDATA[//><!--

sfHover = function() {
	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);

//--><!]]>

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";
        }

    }
}

function ClearValue(field, strCheck)
{
	if(field.value == strCheck)
	field.value = "";				
}
function Repopulate(field, strCheck)
{
	if(field.value == "")
	field.value = strCheck;
}

/* 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;
 	}
}

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)
}