 function String2Array (str, delim) {	var arr = new Array, arrCnt = -1;		var ind2, substr, isFirst = true;	while (str.length > 0) {		if ((str.substring(0, delim.length) == delim && str.length>0) && !isFirst) {			str = str.substring(delim.length);		}		isFirst = false;		ind1 = str.indexOf (delim);		if (ind1 < 0) ind1 = str.length;		substr = str.substring (0,ind1);		str = str.substring (ind1);						arrCnt++;		arr[arrCnt] = substr;	}	return arr;} // String2Arrayfunction ReplaceSubstring (str, strFrom, strTo) {	var newst = "", oldst = str, ind;	while (oldst.length > 0 ){		ind = oldst.indexOf (strFrom);		if (ind < 0) {return (newst + oldst);}		else {newst += oldst.substring (0, ind) + strTo;}		oldst = oldst.substring (ind + strFrom.length);	}	return newst;} // ReplaceSubstringfunction setCookie(name, value, expires, path, domain, secure) {     if (getCookie(name)) {                document.cookie = name + "=" +                 ((path) ? "; path=" + path : "") +                ((domain) ? "; domain=" + domain : "");         }       var curCookie = name + "=" + escape(value) +                ((expires) ? "; expires=" + expires.toGMTString() : "") +                ((path) ? "; path=" + path : "; path=/") +                ((domain) ? "; domain=" + domain :"") +                ((secure) ? "; secure" : "");       if ((name + "=" + escape(value)).length <= 4000)                document.cookie = curCookie;       else                if (confirm("Cookie is more the 4KB and will be cutted!"))                        document.cookie = curCookie;       return true;}  //setCookiefunction getCookie(name){  // cookies are separated by semicolons  var aCookie = document.cookie.split("; ");  for (var i=0; i < aCookie.length; i++)  {    // a name/value pair (a crumb) is separated by an equal sign    var aCrumb = aCookie[i].split("=");    if (name == aCrumb[0]) {      //alert(aCrumb.join(";"));      return unescape(aCrumb[1]);     }  } } // function submitValidation(formName){   return confirm("Are you sure, you want to submit this "+formName+" ?"); }function focusOnField(obj){   try{    obj.focus();  }  catch(e){}   }