<!--

	function echeck(str) { var errMsg = "Your email seems to be invalid!"; var at="@"; var dot="."; var lat=str.indexOf(at); var lstr=str.length; var ldot=str.indexOf(dot); if (str.indexOf(at)==-1){ alert(errMsg); return false; } if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){ alert(errMsg); return false; } if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){ alert(errMsg); return false; } if (str.indexOf(at,(lat+1))!=-1){ alert(errMsg); return false; } if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){ alert(errMsg); return false; } if (str.indexOf(dot,(lat+2))==-1){ alert(errMsg); return false; } if (str.indexOf(" ")!=-1){ alert(errMsg); return false; } return true; }

	function urlCheck(field) {
		if( field.value.substr(0, 7) == 'http://' ) { field.value = field.value.substr(7); }
		if( field.value.substr(field.value.length-1) == '/' ) { field.value = field.value.substr(0, field.value.length-1); }
	}
	
	if (!window.showModalDialog) {
			window.showModalDialog = function(sUrl, vArguments, sFeatures) {
				var wFeatures   = sFeatures.replace(/dialog/gi,"").replace(/:/gi,"=").replace(/;/gi,",");  // plus a little more replacement
				var modalWindow = window.open (sUrl, "_blank", wFeatures);
	 
				modalWindow.setFocusToWindow = function () { modalWindow.focus(); }
				modalWindow.setInterval ("setFocusToWindow()", 100);
			}
	}
	
	
	var QUERY=new Object();
	
	function getQueryString(){
		var RE = new RegExp('\\+','gi');
		var QUERY_STRING=document.location+"";
		QUERY_STRING=QUERY_STRING.replace(RE," ");
		var QUERY_KEY="VERSION";
		var QUERY_DES="2006_madgus@gmail.com";
		QUERY[QUERY_KEY]=QUERY_DES;
		var vpos;
		pos=QUERY_STRING.indexOf("?");
			if (pos != -1){
			QUERY_STRING=QUERY_STRING.substring(pos+1,QUERY_STRING.length);
			while ((pos = QUERY_STRING.indexOf("&"))!=-1){
				QUERY_KEY=QUERY_STRING.substring(0,pos);
				QUERY_STRING=QUERY_STRING.substring(pos+1,QUERY_STRING.length);
				addQuery(QUERY_KEY);
			}
			if (QUERY_STRING.length!=0){
			addQuery(QUERY_STRING);
			}
			}else{return;}
	}
	
	function addQuery(QUERY_KEY){
	//this query key is a substring having whole key=escape(val);
			vpos=QUERY_KEY.indexOf("=");
			if(vpos!=-1){
			QUERY_DES=unescape(QUERY_KEY.substring(vpos+1,QUERY_KEY.length));
			QUERY_KEY=QUERY_KEY.substring(0,vpos);
			QUERY[QUERY_KEY]=QUERY_DES;
			}else{
			QUERY_DES="";
			QUERY[QUERY_KEY]=QUERY_DES;
			}
	}
	
	function getQuery(QUERY_KEY){
		getQueryString();
		if (QUERY_KEY==""){return "";}
		if(QUERY[QUERY_KEY]!=undefined){
		return QUERY[QUERY_KEY];
		}else {return "";}
	}


//-->
