
var auxWindow,hlpWindow


function domObj(objId){return document.getElementById(objId)}
function domTagColl(objName,tagName){return objName.getElementsByTagName(tagName)}
closeAuxWins=function(){if (auxWindow){auxWindow.close()};if (hlpWindow){hlpWindow.close()}}
trim=function(){this.value=this.value.replace(/(^\s*)|(\s*$)/g, "");};
function consLinks(whichBlockID,whichTags){ whichLinks=domTagColl(domObj(whichBlockID),whichTags);for (i=0; i < whichLinks.length; i++){whichLinks[i].onclick=function(){openAuxWindow(this);return false};}};
function openAuxWindow(whatLink){ 

switch (auxWindow){
case undefined :
auxWindow=window.open(whatLink.href,"_blank");auxWindow.focus();
break;

case "undefined" :
auxWindow=window.open(whatLink.href,"_blank");auxWindow.focus();
break;
default :

switch (auxWindow.closed){

case false :
auxWindow.location.replace(whatLink.href);auxWindow.focus();
break;

case true:
auxWindow=window.open(whatLink.href,"_blank");auxWindow.focus();
break;
} } };

function openHlpWindow(whatLink,w,h){ 
var winAttr='"height='+h+',width='+w+',scrollbars=1"';
switch (hlpWindow){
case undefined :
hlpWindow=window.open(whatLink.href,"_blank",winAttr,true);hlpWindow.focus();
break;

case "undefined" :
hlpWindow=window.open(whatLink.href,"_blank",winAttr,true);hlpWindow.focus();
break;
default :

switch (hlpWindow.closed){

case false :
hlpWindow.location.replace(whatLink.href);hlpWindow.focus();
break;

case true:
hlpWindow=window.open(whatLink.href,"_blank",winAttr,true);hlpWindow.focus();
break;
} } };

function testNumeric(whichObj)
{ var leadingZero;re=/(^0+)/g;
whichObj.value=whichObj.value.replace(/(^\s*)|(\s*$)/g, "" );
if(isNaN(whichObj.value)==true){whichObj.value=""; return false}
if((whichObj.value) <= 0 ){whichObj.value=""; return false}
if ((whichObj.value).match(re)==null){whichObj.value=Math.round(whichObj.value);return true} else{whichObj.value=(whichObj.value).match(re)[0]+Math.round(whichObj.value);}

}

function checkBlank(whichObj)
{
	return eval(whichObj.value !="")
		
}

function chkZipCode(whichObj)
{
if (checkBlank(whichObj)==false || testNumeric(whichObj)==false || whichObj.value.length<5){whichObj.focus();domObj("errMsg").innerHTML="Please enter a 5 digit zip code!";return false};
}

function chkPhoneDigits(whichObj,theLength)
{
if (checkBlank(whichObj)==false || testNumeric(whichObj)==false || whichObj.value.length<theLength ){whichObj.focus();domObj("errMsg").innerHTML="Please enter valid telephone digits!";return false};
}

function chkIntegCount(whichObj,theLength){if (checkBlank(whichObj)==false || testNumeric(whichObj)==false || whichObj.value=="0" ){whichObj.focus();domObj("errMsg").innerHTML="Please enter a tentative count!";return false};
}

finishPage=function(){
addSugg=function(){whatObj.appendChild(blk[whatObj.id]);whatObj.onmouseout=clrDel;whichObj=whatObj};

addDel=function(){whatObj=this;whatObj.onmouseout=clrMovDelay; return movDelay=window.setTimeout(addSugg,500)};
clrSugg=function(){domObj(whichObj.id).removeChild(blk[whichObj.id]);whichObj.onmouseover=addDel};
clrDel=function(){whichObj.onmouseover=clrMoutDelay; return motDelay=window.setTimeout(clrSugg,500)}

clrMovDelay=function(){clearTimeout(movDelay);}
clrMoutDelay=function(){clearTimeout(motDelay);}

for (grp in blk){
blk[grp].onmouseover=clrMoutDelay;
blk[grp].onmouseout="";

domObj(grp).onmouseover=addDel;
domObj(grp).onmouseout=clrDel;
consLinks(domObj(grp).id,"a");};};mplsInfo="/services/provisioning/netSolns/req/mplsInfoReq.asp";inetInfo="/services/provisioning/netSolns/req/infoRequest.asp";vpnInfo="/services/provisioning/netSolns/req/vpnInfoReq.asp";mlabsInfo="/services/provisioning/netSolns/req/mlabsInfoReq.asp"