function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;}function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++)if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x;}function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3)if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];}}function selectionMade(){zzz=1;}var itemNames=new Array('dontHaveRow','addListRow','haveItRow');function swap(id,rowNo){if(document.images){for(var i=0;i<itemNames.length;i++){document.images[itemNames[i]+rowNo].src=document.images[itemNames[i]+rowNo].src.replace(/_on/g,'_off');}document.images[id].src=(document.images[id].src).replace(/_off/g,'_on');}else{for(var i=0;i<itemNames.length;i++){document.getElementById(itemNames[i]+rowNo).src=(document.getElementById(itemNames[i]+rowNo).src).replace(/_on/g,'_off');}document.getElementById(id).src=(document.getElementById(id).src).replace(/_off/g,'_on');}}function setInitialColors(){var value=null;try{for(var i=0;i<fieldNames.length;i++){value=document.forms[0][fieldNames[i]].value;if(isNaN(parseInt(value))||parseInt(value)<=0||parseInt(value)>3)continue;swap(itemNames[parseInt(value)-1]+''+(i+1),i+1);}}catch(e){}}function show(which){if(document.getElementById&&document.createTextNode){m=document.getElementById("menu");trig=m.getElementsByTagName("div").item(which).style.display;if(trig=="block")trig="none";else if(trig==""||trig=="none")trig="block";m.getElementsByTagName("div").item(which).style.display=trig;var highlighttext="-";var normaltext="+";}}if(!document.getElementById&&!document.createTextNode){document.write('<style type="text/css">#menu div{display:block;}</style>')}function CloseIE(){}function Dummy(){}function NotImplemented(){alert("Coming Soon!");return false;}var isNetscape=(navigator.appName=="Netscape")?1:0;function ValidateInput(event){var retSpecial=ValidateSpecial(event);var retQuotes=ValidateQuoted(event);var retVal=retSpecial&&retQuotes;return retVal;}function ValidateSpecial(event){if(!isNetscape){if((event.keyCode>32&&event.keyCode<48)||(event.keyCode>57&&event.keyCode<65)||(event.keyCode>90&&event.keyCode<97))event.returnValue=false;}else{if((event.which>32&&event.which<48)||(event.which>57&&event.which<65)||(event.which>90&&event.which<97))return false;}}function ValidateSpecialWithComma(event){if(!isNetscape){if(event.keyCode==63||event.keyCode==59||event.keyCode==44||event.keyCode==46){event.returnValue=true;return true;}}else{if(event.which==63||event.which==59||event.which==44||event.which==46)return true;}if(!isNetscape){if((event.keyCode>32&&event.keyCode<48)||(event.keyCode>57&&event.keyCode<65)||(event.keyCode>90&&event.keyCode<97))event.returnValue=false;}else{if((event.which>32&&event.which<48)||(event.which>57&&event.which<65)||(event.which>90&&event.which<97))return false;}}function ValidateQuoted(event){if(!isNetscape){if(event.keyCode==34||event.keyCode==39)event.returnValue=false;}else{if(event.which==34||event.which==39)return false;}}function ValidateMaxLength(event,control,maxlimit){var objControl=document.getElementById(control);if(objControl!=null&&objControl!='undefined'&&objControl!=''){TextCounter(objControl,maxlimit);}}function ValidateNumbers(event){if(!isNetscape){if(event.keyCode<45||event.keyCode>57)event.returnValue=false;}else{if(event.which==8)return true;if(event.which<45||event.which>57)return false;}}function TextCounter(objControl,maxlimit){objControl.value=StripHTML(objControl.value);if(objControl.value.length>maxlimit){objControl.value=objControl.value.substring(0,maxlimit);}}function StripHTML(html){return html.replace(/(<([^>]+)>)/ig,"");}function DisablePaste(event){if(!isNetscape){if(event.keyCode==17)event.returnValue=false;}else{if(event.which==17)return false;}}function IsDate(str){var re=/^(\d{1,2})[\s\.\/-](\d{1,2})[\s\.\/-](\d{4})$/;if(!re.test(str))return false;var result=str.match(re);var m=parseInt(result[1]);var d=parseInt(result[2]);var y=parseInt(result[3]);if(m<1||m>12||y<1900||y>2100)return false;if(m==2){var days=((y%4)==0)?29:28;}else if(m==4||m==6||m==9||m==11){var days=30;}else{var days=31;}return(d>=1&&d<=days);}function isValidDate(dateStr){var datePat=/^(\d{1,2})(\/|-)(\d{1,2})\2(\d{4})$/;var matchArray=dateStr.match(datePat);if(matchArray==null){return false;}month=matchArray[1];day=matchArray[3];year=matchArray[4];if(month<1||month>12){return false;}if(day<1||day>31){return false;}if((month==4||month==6||month==9||month==11)&&day==31){return false}if(month==2){var isleap=(year%4==0&&(year%100!=0||year%400==0));if(day>29||(day==29&&!isleap)){return false;}}return true;} /*PHONE*/  function FormatUSPhoneNo(control,event){var detect=navigator.userAgent.toLowerCase();var isSafari=false;if(detect.indexOf('safari')>-1)isSafari=true;if(!isSafari){var isNS4=(navigator.appName=="Netscape")?1:0;if(!isNS4){if((event.keyCode>=48&&event.keyCode<=57)||(event.keyCode==8)||(event.keyCode==0)){if((control.value.length==1)&&(''!=control.value.charAt(0)))control.value=""+control.value;if(control.value.length==0)if(event.keyCode!=8)control.value=control.value+"";if(control.value.length==3)if(event.keyCode!=8)control.value=control.value+"-";if(control.value.length==8)if(event.keyCode!=8)control.value=control.value+"-";if(control.value.length==7)if(event.keyCode!=8)control.value=control.value+"-";event.returnValue=true;}else{event.returnValue=false;}}else{if((event.which>=48&&event.which<=57)||(event.which==8)||(event.which==0)){if((control.value.length==1)&&(''!=control.value.charAt(0)))control.value=""+control.value;if(control.value.length==0)if(event.which!=8){control.value=control.value+"";}if(control.value.length==3)if(event.which!=8){control.value=control.value+"-";}if(control.value.length==8)if(event.which!=8){control.value=control.value+"-";}if(control.value.length==7)if(event.which!=8){control.value=control.value+"-";}event.returnValue=true;return true;}else{return false;}}}else{if((event.which>=48&&event.which<=57)||(event.which==8)||(event.which==0)||(event.which==45)){event.returnValue=true;return true;}else{return false;}}}    /*end*/  function TrimText(control){var s=control.value;s=s.replace(/^\s*|\s*$/g,"");control.value=s;}

/* joy
added to test the iFrame height */


/***********************************************
* IFrame SSI script II- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of original DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["MainIFrame"]

//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"

var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

function resizeCaller() 
{
	//alert('resizeCaller');
	var dyniframe=new Array()
	for (i=0; i<iframeids.length; i++){
	if (document.getElementById)
	resizeIframe(iframeids[i])
	//reveal iframe for lower end browsers? (see var above):
	if ((document.all || document.getElementById) && iframehide=="no"){
	var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
	tempobj.style.display="block"
	}
	}
}

function resizeIframe(frameid)
{
	//alert('resizeIframe');
	var currentfr=document.getElementById(frameid)
	if (currentfr && !window.opera){
	currentfr.style.display="block"
	if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
	currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight; 
	else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
	currentfr.height = currentfr.Document.body.scrollHeight;
	if (currentfr.addEventListener)
	currentfr.addEventListener("load", readjustIframe, false)
	else if (currentfr.attachEvent){
	currentfr.detachEvent("onload", readjustIframe) // Bug fix line
	currentfr.attachEvent("onload", readjustIframe)
	}
	}
}

function readjustIframe(loadevt) 
{
	//alert('readjustIframe');
	var crossevt=(window.event)? event : loadevt
	var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
	if (iframeroot)
	resizeIframe(iframeroot.id);
}

function loadintoIframe(iframeid, url)
{
	//alert('loadintoIframe');
	if (document.getElementById)
	document.getElementById(iframeid).src=url
}

if (window.addEventListener)
	window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
	window.attachEvent("onload", resizeCaller)
else
	window.onload=resizeCaller


/* end */

function SetIFrameHeight()
{ 
	//alert('SetIFrameHeight');
	var objMainIFrame=parent.document.getElementById('MainIFrame');
	if(objMainIFrame!=''&&objMainIFrame!=null&&objMainIFrame!='undefined')
	{
		eraseCookie("OSIFRAME");
		createCookie("OSIFRAME",parent.window.frames['MainIFrame'].location.href,1);
		try
		{
			parent.document.title=parent.window.frames['MainIFrame'].document.title;
			var currentHeight=document.body.scrollHeight;
			objMainIFrame.height=currentHeight;
			//alert('height ');
			//var iFrameHeight = parent.window.frames['MainIFrame'].document.body.scrollheight;
			//alert('height ' + iFrameHeight);
			
			//resizeCaller();
			parent.window.scrollTo(0,0); 		
			//if(history.length>0)history.go(+1); -- Commented it to start the functionality of back button of browser.
			SetTimeOut();
		}
		catch(e){}
	}
}

var macIE=navigator.userAgent.toLowerCase();
if(macIE.indexOf('msie 5.23')>-1)
{
	alert("We're sorry. Internet Explorer for Mac is not supported. Microsoft has discontinued supporting this browser.");
}

function SetIframePage(iFrame)
{
	var pageSrc=readCookie("OSIFRAME");
	var currentSrc=parent.window.frames['MainIFrame'].location.href;
	
	if(null!=pageSrc&&currentSrc!=pageSrc)
	{
		iFrame.src=pageSrc;
	}
	else if(iFrame.src.indexOf('start.htm')>-1)
	{
		//iFrame.src="../OnePlan/Destination.aspx";
		iFrame.src="../Home/Getting-Started.aspx";
		createCookie("OSIFRAME",iFrame.src,1);
	}
}
function SetEMPageStatus(link){
try{
	var objLink=document.getElementsByName(link);
	
	if(null!=objLink&&'undefined'!=objLink)
	{
		objLink[0].className="EMplanSource";}
	}
	catch(e){}
}

function hidestatus(){window.status='www.onestorm.org';return true;}if(document.layers){document.captureEvents(Event.MOUSEOVER|Event.MOUSEOUT|Event.MOUSEDOWN);}document.onmouseover=hidestatus;document.onmouseout=hidestatus;document.onmousedown=hidestatus;function displayProperties(obj){var str="";var prop;if(typeof(obj.length)!="undefined"&&typeof(obj[0])!="undefined"){for(prop=0;prop<obj.length;prop++){str+="\n"+prop+"="+obj[prop];}}else{for(prop in obj){str+="\n"+prop+"="+eval("obj."+prop);}}alert(str);}function CkeckStatus(errorMesssage){var value=null;var flag=0;for(i=0;i<fieldNames.length;i++){value=document.forms[0][fieldNames[i]].value;if(parseInt(value)==0){flag=1;}}if(flag==1){var chekStatus=confirm(errorMesssage);if(chekStatus==true){return true;}else{return false;}}else{return true;}}function SetFocus(Element){var obj=document.getElementById(Element);if(null!=obj&&'undefined'!=obj){obj.focus();}}function SubmitButton(event){if((event.which?event.which:event.keyCode)==13){var objNextButton=document.getElementById('ctlNavigation_btnNext');if(null!=objNextButton&&'undefined'!=objNextButton){try{if(isNetscape){objNextButton.click();return false;}else{objNextButton.click();event.returnValue=false;event.cancel=true;}}catch(e){}}}}

function SetPageStatus(link)
{
	try
	{
		var objLink=document.getElementsByName(link);		
		
		
		if(null!=objLink&&'undefined'!=objLink)
		{	
			if(objLink[0].id.match('rptLocationM__ctl0') || objLink[0].id.match('rptPlanToGo__ctl0'))
			{
				objLink[0].parentNode.className ="FstAct";
			}
			else
			{
				objLink[0].parentNode.className ="Act";
			}
		}
		//alert(objLink[0].parentNode.parentNode.parentNode.id);
	}
	catch(e)
	{}
}

function SetPlanStatus(link)
{
	try
	{
		var objLink=document.getElementsByName(link);		
		if(null!=objLink&&'undefined'!=objLink)
		{	
			if(objLink[0].id.match('0'))
			{
				
				objLink[0].parentNode.className ="FstAct";
			}
			else
			{
				
				objLink[0].parentNode.className ="Act";
			}
		}		
		//alert(objLink[0].parentNode.parentNode.parentNode.id);
		//debugger
		//new animatedcollapse(objLink[0].parentNode.parentNode.parentNode.id, 400, false, "block");
	}
	catch(e){}
}
var objLastIMG;var objLastTD;function ShowLocationDiv(Div){if(Div<0)return true;HideAllDivs();var currDIV="TRK_DIV_"+Div;var currIMG="IMG_"+Div;var currTD="TD_"+Div;try{objDiv=document.getElementById(currDIV);if(null!=objDiv&&objDiv!='undefined'){objDiv.style.display="";if(null!=objLastTD&&'undefined'!=objLastTD){objLastTD.className="multipleOff";}if(null!=objLastIMG&&'undefined'!=objLastIMG){objLastIMG.src="../Images/en-US/arrow_downgray_off.gif";}var objTD=document.getElementById(currTD);objLastTD=objTD;objTD.className="planSource";var objIMG=document.getElementById(currIMG);objLastIMG=objIMG;objIMG.src="../Images/en-US/arrow_downgray.gif";}}catch(e){}}function HideAllDivs(){try{if(typeof(locationDivs)=="undefined")return true;if(null!=locationDivs&&locationDivs!='undefined'){for(var iDivCount=0;iDivCount<locationDivs.length;iDivCount++){objDiv=document.getElementById(locationDivs[iDivCount]);if(null!=objDiv&&objDiv!='undefined'){objDiv.style.display="none";}}}}catch(e){}}function ShowFirstDiv(){try{if(typeof(locationDivs)=="undefined")return true;if(null!=locationDivs&&locationDivs!='undefined'){var tmpLoc=locationDivs[0];var indexofDiv=tmpLoc.indexOf('DIV_')+4;var currLocID=tmpLoc.substring(indexofDiv,tmpLoc.length);var currIMG="IMG_"+currLocID;var currTD="TD_"+currLocID;objDiv=document.getElementById(locationDivs[0]);if(null!=objDiv&&objDiv!='undefined'){objDiv.style.display="";var objTD=document.getElementById(currTD);objLastTD=objTD;objTD.className="planSource";var objIMG=document.getElementById(currIMG);objLastIMG=objIMG;objIMG.src="../Images/en-US/arrow_downgray.gif";}}}catch(e){}}function ReloadWindow(){window.location.href = window.location.href;}function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}else var expires="";document.cookie=name+"="+value+expires+"; path=/";}function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}return null;}function eraseCookie(name){createCookie(name,"",-1);}function SetTimeOut(){setTimeout('ShowTimeoutWarning();',3600000);}function ShowTimeoutWarning(){window.alert("You will be automatically logged out unless you do something!");}function PopupPage(pageUrl,pageWidth,pageHeight,scroll){var left=(screen.width-pageWidth)/2;var top=(screen.height-pageHeight)/2;if(isNaN(left))left=0;if(isNaN(top))top=0;var pageDummy=pageUrl.substring(pageUrl.indexOf(".aspx"),pageUrl.indexOf(".aspx")-3);var newPopup=window.open(pageUrl,pageDummy,"dependent=yes, directories=no, location=no, menubar=no, personalbar=no, resizable=yes, scrollbars="+scroll+", scrollbars="+scroll+",status=no, toolbar=no, height="+pageHeight+", width="+pageWidth+", left="+left+", top="+top+", dialog=yes");return false;}function openWindow(pageUrl){window.open(pageUrl);return false;}function PCase(STRING){}function setLastUrl(){pageUrl = parent.window.frames['MainIFrame'].location.href;var PageName=pageUrl.substring(pageUrl.lastIndexOf("/")+1);if(PageName=="Plan-Landing.aspx"||PageName=="Getting-Started.aspx"||PageName=="Progress-Saved.aspx"){}else{createCookie("LastPage",pageUrl);}}
/* script for live support */

	var LS;
	var Z="";
	var Zpro="";
	var Z1="";
	var cyl=0;
	var imgload=false;
	var l2s_ls5203;
	var offimg=new Image();
	var onimg=new Image();
	var l2s_winchk = 0;
	// window.onerror = noerr;
	function noerr(){
		return true;
	}
	function getCookie(NameOfCookie)
	{ if (document.cookie.length > 0) 
		{ begin = document.cookie.indexOf(NameOfCookie+"="); 
			if (begin != -1) 
			{ begin += NameOfCookie.length+1; 
				end = document.cookie.indexOf(";", begin);
				if (end == -1) end = document.cookie.length;
				return unescape(document.cookie.substring(begin, end)); 
			} 
		}
		return null; 
	}
	function setCookie(NameOfCookie, value, expiredays) 
	{ var ExpireDate = new Date ();
		ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));
		document.cookie = NameOfCookie + "=" + escape(value) + 
		((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString())+
	      (";path=/");
	}
	pvalue=getCookie("ssid5203");
	l2_pv=getCookie("l2_pv");
	if (pvalue==null) {
				pvalue="2587944567f96878b0";
		setCookie("ssid5203", pvalue);
	}
	if (l2_pv==null) {
		l2_pv=1;
		setCookie("l2_pv", l2_pv,700);
	} else {
		l2_pv++;
		if (l2_pv > 99) {
			l2_pv=100;
		}
		setCookie("l2_pv", l2_pv,700);
	}
				offimg.src="https://www.onestorm.org/images/en-US/track-progress-offline.gif";
			onimg.src="https://www.onestorm.org/images/en-US/track-progress-online.gif";
		var jsid=5203;
	var refrate=15000;
	var sttime=tstamp();
	var nimg;
	var chat_opened = "N" ;
	var prop_opened = "N" ;
	var chatinit = 0 ;
	var chatinv = new Image();
	

function browser(id1){
ie=document.all;
nn4=document.layers;
  if(nn4) {
  	path = document.layers[id1];
  }
  else if(ie) {
  	path = document.all[id1];
  } 
  else {
  	path = document.getElementById(id1);
  }
return path;
}

function hideLayer() {
	document.getElementById('l2s_frm').src='https://live2support.com/lsn/userout.php?ipadd=&lyr=1&sid=5203&csesid='+pvalue;
	var l2s_layer = browser("l2s_ch");
	if(!nn4){
 		l2s_layer.style.visibility="hidden";
	} else{
		l2s_layer.visibility="hidden";
	}
}

function centerElement(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}

function l2s_lyr_pos(){
// Position layer		
var calculate=ns? "" : "px";
var ie=(document.all);
var ns=(document.layers);
var ns6=(document.getElementById && !ie);
if (ie){
	documentWidth = (centerElement().offsetWidth)/2+centerElement().scrollLeft-(370/2);
	documentHeight = (centerElement().offsetHeight)/2+centerElement().scrollTop-(335/2);
}
else if (ns){
	documentWidth=window.innerWidth/2+window.pageXOffset-(370/2);
	documentHeight=window.innerHeight/2+window.pageYOffset-(335/2);
}
else if (ns6){
	documentWidth=self.innerWidth/2+window.pageXOffset-(370/2);
	documentHeight=self.innerHeight/2+window.pageYOffset-(335/2);
}
documentWidth=parseInt(documentWidth);
documentHeight=parseInt(documentHeight);
var l2s_layer = browser("l2s_ch");
if(document.layers)	   //NN4+
{
   l2s_layer.top = documentHeight+calculate;
   l2s_layer.left = documentWidth+calculate;
}
 else if(document.getElementById)	  //gecko(NN6) + IE 5+
{
	l2s_layer.style.top = documentHeight+calculate;
	l2s_layer.style.left = documentWidth+calculate;
    }
else if(document.all)	// IE 4
{
	l2s_layer.style.top= documentHeight+calculate;
	l2s_layer.style.left= documentWidth+calculate;
    }
// end Position layer	
}


function l2s_layerchat(l2surl)
	{
		var l2s_layer = browser("l2s_ch");
	
		var content='<IFR'+'AME SRC="'+l2surl+'" id="l2s_frm" name="l2s_frm" WIDTH="370" HEIGHT="335" MARGINWIDTH=0 MARGINHEIGHT=0 FRAMEBORDER="NO" SCROLLING="no"';
		content=content+'STYLE="border-width:1; border-color:#445599; border-style:solid;"> </IFR'+'AME><table border=1 cellpadding=0 cellspacing=0 bgcolor=#000000 width="370" ><tr><td><p align=right><a href="#" onclick="javascript:hideLayer()"><font color=ffffff>Close</font></a></p></td></tr></table></DIV>';
		l2s_lyr_pos();
		if(nn4) {
			l2s_layer.document.open();
			l2s_layer.document.write(content);
			l2s_layer.document.close();
			l2s_layer.visibility="visible";
		}
		else {		     
			l2s_layer.innerHTML = content;
			l2s_layer.style.visibility="visible";
		}
		
	}
	function winchk(l2surlchat) {
		if (l2s_winchk==0) {
			l2s_layerchat(l2surlchat);
		}
	}
	function set1Events(l2surlchat,njsid) {
		var objChild;                           // Window
		var reWork = new RegExp('object','gi');	// Regular expression
		var winno="ls"+njsid;
		try {
			// objChild = window.open('','child','width=50,height=50,status=no,resizable=yes'); 
			objChild = window.open(l2surlchat,winno,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=370,height=335");
			// objChild.close();
		}
		catch(e) { }
		if(!reWork.test(String(objChild))) {
			l2s_layerchat(l2surlchat);
		} else {
			objChild.focus() ;
			// wchk = setTimeout("winchk(l2surlchat)",10000);
		}
	}
	function lswin(Z,njsid)
	{
		var winno="ls"+njsid;
		var chwin;

					l2surlchat="https://live2support.com/lsn/chat.php?&init=f&"+Z;
			set1Events(l2surlchat,njsid);
	}
	function propop(njsid,newr)
	{
		var pwinno="prop"+njsid;
		var ctime1=tstamp();
		if (newr=="N") {
// here is window opening
			phwin=window.open("https://live2support.com/lsn/prop.php?"+Zpro+"&"+ctime1,pwinno,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=500");
			phwin.focus() ;
		} else {
			top.location="https://live2support.com/lsn/prop.php?"+Zpro+"&"+ctime1;
		}
	}
	function imgdsp() {
		var ctime=tstamp();
		var diftime=ctime-sttime;
		if (diftime > 900000)
			refrate=120000;
		if (diftime > 1800000)
			refrate=180000;
		if (diftime > 7200000)
			refrate=25000000;
		nimg=new Image();
		if (cyl==0) {
			nimg.src="https://live2support.com/lsn/lstrk.php?"+Z+"&ct="+ctime;
			cyl=1;
		} else {
			nimg.src="https://live2support.com/lsn/lstrk.php?"+Z1+"&ls_n=1&ct="+ctime;
		}
		nimg.onload = chatintr;
		tid = setTimeout("imgdsp()",refrate);
	}
	function chatintr()
	{
		chatinit = nimg.width ;
		if ( ( chatinit  == 2 ) && chat_opened=="N" )
		{
			chat_opened = "Y" ;
			lswin(Z,jsid);
		}
		else if ( ( chatinit != 2 ) && (chat_opened=="Y") ) {
			chat_opened = "N" ;
		}
		if ( ( chatinit  == 8 ) && prop_opened=="N" )
		{
			prop_opened = "Y" ;
			propop(jsid,"N");
		}
		else if ( ( chatinit != 8 ) && (prop_opened=="Y") ) {
			prop_opened = "N" ;
		}
		if ( ( chatinit  == 9 ) && prop_opened=="N" )
		{
			prop_opened = "Y" ;
			propop(jsid,"R");
		}
		else if ( ( chatinit != 9 ) && (prop_opened=="Y") ) {
			prop_opened = "N" ;
		}
					if ( chatinit  == 3 ) 
				document.L2S.src=onimg.src;
			else if ( chatinit  == 1 )
				document.L2S.src=offimg.src;			
			}
	function cleartid() {
		window.clearTimeout(tid);
	}
	function live2sp5203()
	{
		var t = new Date();
		tmc=(((escape(t.getTimezoneOffset()))/60)*-1);
		tmcabs=Math.floor(tmc);
		tdiff=tmc-tmcabs;
		ntdiff=(tdiff/5)*3;
		ntmc=tmcabs+ntdiff;
		Z+="tz="+ntmc;
		Z+="&ch="+escape(t.getHours())+"H:"+escape(t.getMinutes())+"M";
		Z+="&ti=";
		Z+="&js=Yes";
		Z+="&sid="+jsid;
		Z+="&l2_pv="+l2_pv;
		Z+="&slevel=2";
		Z+="&ul="+(navigator.appName=="Netscape"?navigator.language:navigator.userLanguage);
		if(typeof(screen)=="object")
		{ 
			Z+="&sr="+screen.width+"x"+screen.height;
			Z+="&cd="+screen.colorDepth;
			Z+="&jo="+(navigator.javaEnabled()?"Yes":"No");
		}
		Z+="&url="+escape(window.document.URL);
		Z+="&rf="+escape(window.document.referrer);
		Z+="&rot=1";
		Z+="&ssid5203="+pvalue;
		Z1+="sid="+jsid;
		Z1+="&slevel=2";
		Z1+="&rot=2";
		Z1+="&ssid5203="+pvalue;
		Zpro="sid="+jsid+"&ssid5203="+pvalue;
		ab="<A HREF='javascript: void(0)' onMouseOver='window.status=\"Live Chat\"; return true;' onMouseOut='window.status=\"\"; return true;' onClick='javascript:lswin(";
		ab=ab+'"'+Z+'"'+',"'+jsid+'"'+");'>";		

	}	
	function tstamp()
	{
		var ndate = new Date() ; return ndate.getTime() ; 
	}
	
	function goLive() {
		live2sp5203(); // just to set the variables we'll need
		lswin(Z+','+jsid);
	}
   
   
   function CheckUncheck(aspCheckBoxID, obj)
	{
	checkVal=obj.checked
	//alert(checkVal);
	//re = new RegExp(':' + aspCheckBoxID + '$')  //generated controlname starts with a colon
	for(i = 0; i < document.forms[0].elements.length; i++) 
	{
		elm = document.forms[0].elements[i]
		if (elm.type == 'checkbox') 
		{
			elm.checked = checkVal
		}
	}
  }	

function selectionMadeSani()
{
	zzz=1;
}
var itemNamesS=new Array('dontHaveRowS','addListRowS','haveItRowS');
function swapS(id,rowNo)
{
	if(document.images)
	{
		for(var i=0;i<itemNamesS.length;i++)
		{
			document.images[itemNamesS[i]+rowNo].src=document.images[itemNamesS[i]+rowNo].src.replace(/_on/g,'_off');
		}
		document.images[id].src=(document.images[id].src).replace(/_off/g,'_on');
	}
	else
	{
		for(var i=0;i<itemNamesS.length;i++)
		{
			document.getElementById(itemNamesS[i]+rowNo).src=(document.getElementById(itemNamesS[i]+rowNo).src).replace(/_on/g,'_off');
		}
		document.getElementById(id).src=(document.getElementById(id).src).replace(/_off/g,'_on');
	}
}


function selectionMadeDrWater()
{
	zzz=1;
}
var itemNamesDS=new Array('dontHaveRowDS','addListRowDS','haveItRowDS');
function swapDS(id,rowNo)
{
	if(document.images)
	{
		for(var i=0;i<itemNamesDS.length;i++)
		{
			document.images[itemNamesDS[i]+rowNo].src=document.images[itemNamesDS[i]+rowNo].src.replace(/_on/g,'_off');
		}
		document.images[id].src=(document.images[id].src).replace(/_off/g,'_on');
	}
	else
	{
		for(var i=0;i<itemNamesDS.length;i++)
		{
			document.getElementById(itemNamesDS[i]+rowNo).src=(document.getElementById(itemNamesDS[i]+rowNo).src).replace(/_on/g,'_off');
		}
		document.getElementById(id).src=(document.getElementById(id).src).replace(/_off/g,'_on');
	}
}
function ValidateMaxLengthOnly(event,control,maxlimit)
{
	var objControl=document.getElementById(control);
	if(objControl!=null&&objControl!='undefined'&&objControl!='')
	{
		TextCounterOnly(objControl,maxlimit);
	}
}

function TextCounterOnly(objControl,maxlimit)
{
	if(objControl.value.length>maxlimit)
	{
		objControl.value=objControl.value.substring(0,maxlimit);
	}
}


function CheckListSelected(errorMesssage)
{
	elements = document.getElementsByTagName('input');
	var flagFoodWater = false;
	var myName = '';
	var tmpArray = new Array();
	for (var i = 0, j = 0;i < elements.length;i++)
	{
		if (elements[i].type == "radio" && elements[i].name.match("FoodAndWater"))
		{
			tmpArray[j++] = i;
		}
	}
	
	//var cnt = 0;
	for (var i = 0;i < tmpArray.length; i++)
	{
		if(myName != elements[tmpArray[i]].name)
		{
			myName = elements[tmpArray[i]].name; 
			if (elements[tmpArray[i]].checked || elements[tmpArray[i + 1]].checked || elements[tmpArray[i + 2]].checked)
			{
		        
			}
			else
			{
				//alert('Please check the radio');
				//var ans = confirm('Unchecked items will be automatically added to your shopping list. Click Cancel to return to list or OK to continue.');
				var ans = confirm(errorMesssage);
				if(ans)
				{
					return true;
				}
				else
				{
					return false;
				}		                    
			}		                
		}
	}
}

function SetSectionOn(objSection) 
{ 	
	
	var objDiv1 = document.getElementsByTagName('a'); 
	var objDiv11 = new Array();
	var j=0;	
	if(objDiv1 != null) 
	{ 
		for(var i = 0;i<objDiv1.length;i++) 
		{ 					
			if(objDiv1[i].id.match('lnksection'))
			{	
				objDiv11[j] = objDiv1[i];		
				j = j + 1;				
			}		
		}
					
		for(var k = 0;k<objDiv11.length;k++)
		{
			if(objDiv11[k] != null)
			{
				
				//objDiv11[k].className = 'sectionoff';		
				
				if(objDiv11[k].id.match(objSection))
				{
					objDiv11[k].className = 'sectionon';						
					alert(objDiv11[k].id);
					objDiv11[k].id.onclick ="javascript:changeLinkColor("+ objSection + ")";
				}
			}			
		}	
		
	} 
}

//Animated Collapsible DIV- Author: Dynamic Drive (http://www.dynamicdrive.com)
//Last updated Aug 1st, 07'. Fixed bug with "block" parameter not working when persist is enabled
//Updated June 27th, 07'. Added ability for a DIV to be initially expanded.

var uniquepageid=window.location.href.replace("http://"+window.location.hostname, "").replace(/^\//, "") //get current page path and name, used to uniquely identify this page for persistence feature

function animatedcollapse(divId, animatetime, persistexpand, initstate){
	this.divId=divId	
	this.divObj=document.getElementById(divId)
	this.divObj.style.overflow="hidden"
	this.timelength=animatetime
	this.initstate=(typeof initstate!="undefined" && initstate=="block")? "block" : "contract"
	this.isExpanded=animatedcollapse.getCookie(uniquepageid+"-"+divId) //"yes" or "no", based on cookie value
	this.contentheight=parseInt(this.divObj.style.height)
	var thisobj=this
	if (isNaN(this.contentheight)){ //if no CSS "height" attribute explicitly defined, get DIV's height on window.load
		animatedcollapse.dotask(window, function(){thisobj._getheight(persistexpand)}, "load")
		if (!persistexpand && this.initstate=="contract" || persistexpand && this.isExpanded!="yes" && this.isExpanded!="") //Hide DIV (unless div should be expanded by default, OR persistence is enabled and this DIV should be expanded)
			this.divObj.style.visibility="hidden" //hide content (versus collapse) until we can get its height
	}
	else if (!persistexpand && this.initstate=="contract" || persistexpand && this.isExpanded!="yes" && this.isExpanded!="") //Hide DIV (unless div should be expanded by default, OR persistence is enabled and this DIV should be expanded)
		this.divObj.style.height=0 //just collapse content if CSS "height" attribute available
	if (persistexpand)
		animatedcollapse.dotask(window, function(){animatedcollapse.setCookie(uniquepageid+"-"+thisobj.divId, thisobj.isExpanded)}, "unload")
}

animatedcollapse.prototype._getheight=function(persistexpand){
	this.contentheight=this.divObj.offsetHeight
	if (!persistexpand && this.initstate=="contract" || persistexpand && this.isExpanded!="yes"){ //Hide DIV (unless div should be expanded by default, OR persistence is enabled and this DIV should be expanded)
		this.divObj.style.height=0 //collapse content
		this.divObj.style.visibility="visible"
	}
	else //else if persistence is enabled AND this content should be expanded, define its CSS height value so slideup() has something to work with
		this.divObj.style.height=this.contentheight+"px"
}


animatedcollapse.prototype._slideengine=function(direction){
	var elapsed=new Date().getTime()-this.startTime //get time animation has run
	var thisobj=this
	if (elapsed<this.timelength){ //if time run is less than specified length
		var distancepercent=(direction=="down")? animatedcollapse.curveincrement(elapsed/this.timelength) : 1-animatedcollapse.curveincrement(elapsed/this.timelength)
	this.divObj.style.height=distancepercent * this.contentheight +"px"
	this.runtimer=setTimeout(function(){thisobj._slideengine(direction)}, 10)
	}
	else{ //if animation finished
		this.divObj.style.height=(direction=="down")? this.contentheight+"px" : 0
		this.isExpanded=(direction=="down")? "yes" : "no" //remember whether content is expanded or not
		this.runtimer=null
	}
}


animatedcollapse.prototype.slidedown=function(){
	if (typeof this.runtimer=="undefined" || this.runtimer==null){ //if animation isn't already running or has stopped running
		if (isNaN(this.contentheight)) //if content height not available yet (until window.onload)
			alert("Please wait until document has fully loaded then click again")
		else if (parseInt(this.divObj.style.height)==0){ //if content is collapsed
			this.startTime=new Date().getTime() //Set animation start time
			this._slideengine("down")
		}
	}
}

animatedcollapse.prototype.slideup=function(){
	if (typeof this.runtimer=="undefined" || this.runtimer==null){ //if animation isn't already running or has stopped running
		if (isNaN(this.contentheight)) //if content height not available yet (until window.onload)
			alert("Please wait until document has fully loaded then click again")
		else if (parseInt(this.divObj.style.height)==this.contentheight){ //if content is expanded
			this.startTime=new Date().getTime()
			this._slideengine("up")
		}
	}
}

animatedcollapse.prototype.slideit=function(){
	if (isNaN(this.contentheight)) //if content height not available yet (until window.onload)
		alert("Please wait until document has fully loaded then click again")
	else if (parseInt(this.divObj.style.height)==0)
		this.slidedown()
	else if (parseInt(this.divObj.style.height)==this.contentheight)
		this.slideup()
}

// -------------------------------------------------------------------
// A few utility functions below:
// -------------------------------------------------------------------

animatedcollapse.curveincrement=function(percent){
	return (1-Math.cos(percent*Math.PI)) / 2 //return cos curve based value from a percentage input
}


animatedcollapse.dotask=function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
	var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
	if (target.addEventListener)
		target.addEventListener(tasktype, functionref, false)
	else if (target.attachEvent)
		target.attachEvent(tasktype, functionref)
}

animatedcollapse.getCookie=function(Name){ 
	var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
	if (document.cookie.match(re)) //if cookie found
		return document.cookie.match(re)[0].split("=")[1] //return its value
	return ""
}

animatedcollapse.setCookie=function(name, value){
		document.cookie = name+"="+value
}