<!-- Hoover Caption -->

var checked_s = false;

var mousex=0;

var mousey=0;

var p=window.createPopup();

var pbody=p.document.body;

<!-- GetDate -->

var dayarray=new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat")

var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")

function getFlashVersion(){ 

  // ie 

  try { 

    try { 

      // avoid fp6 minor version lookup issues 

      // see: http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/ 

      var axo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6'); 

      try { axo.AllowScriptAccess = 'always'; } 

      catch(e) { return '6,0,0'; } 

    } catch(e) {} 

    return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1]; 

  // other browsers 

  } catch(e) { 

    try { 

      if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){ 

        return (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1]; 

      } 

    } catch(e) {} 

  } 

  return '0,0,0'; 

} 

function getthedate(){

}



function goforit(){

	



} 

/*function goforit(w2gL_username,w2gL_fname,w2gL_lname,w2gL_ucode){

if (document.all||document.getElementById)

setInterval("getthedate()",1000)



} */

function goforitL(){

if (document.all||document.getElementById)

setInterval("getthedate()",1000)

}

function MM_jumpMenu(targ,selObj,restore){ //v3.0

  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");

  if (restore) selObj.selectedIndex=0;

}



function ajaxLoader(url,id,temporary) {

	 //alert(url);

  if (document.getElementById) {

    var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();

  }

  if (x) {

    x.onreadystatechange = function() {

      if (x.readyState == 4 && x.status == 200) {

		if(document.getElementById(id))

        el = document.getElementById(id);

		if(document.getElementById(temporary))

		el2 = document.getElementById(temporary);

		//alert(x.responseText);

		

		if(x.responseText.indexOf("seacrh_internal}}") + "" != "-1")

		{

			var sear_att = x.responseText.split("}}");

			if(document.getElementById(id))

				el.innerHTML = "Searching, thank you for your patience!";

			

			//alert(sear_att[1]);

			ajaxLoader(sear_att[1],'result_frame');

		}

		else

		{

			if(document.getElementById(id))

		    	el.innerHTML = x.responseText;

			if(document.getElementById(temporary))

				el2.value = "change applied";

		}

		//alert("varlu "+el2.value);

      }

    }

    x.open("GET", url, true);

    x.send(null);

  }

}



function ajaxLoader_f(url,id) { 

  if (document.getElementById) {

    var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();

  }

  if (x) {

    x.onreadystatechange = function() {

      if (x.readyState == 4 && x.status == 200) {

        el = document.getElementById(id);

		//alert(x.responseText);		

		document.getElementById('first_frame').innerHTML = "";

		alert(document.getElementById('first_frame').innerHTML);

		//if(document.getElementById('first_frame'))

		//{	document.getElementById('first_frame').innerHTML = "";	}

        document.getElementById('result_frame').innerHTML = x.responseText;

      }

    }

    x.open("GET", url, true);

    x.send(null);

  }

}



function getHTML(url,pbody) { 

  if (document.getElementById) {

    var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();

  }

  if (x) {

    x.onreadystatechange = function() {

      if (x.readyState == 4 && x.status == 200) {

		//alert(x.responseText);	

		

		pbody.innerHTML=x.responseText;

		//return x.responseText;

      }

    }

    x.open("GET", url, true);

    x.send(null);

  }

}





function LoaderUrl(url) {

  //alert("dbtrue");  

 

  if (document.getElementById) {

    var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();

  }

  if (x) {

    x.onreadystatechange = function() {

      if (x.readyState == 4 && x.status == 200) {

			var return_T = x.responseText; 

			

			if(return_T == "success")

				alert("Your Business was added successfully");

			else

				alert("Sorry, your business was not added. Please try again!");

      }

    }

    x.open("GET", url, true);

    x.send(null);

  }

}







// Check for email address: look for [@] and [.] 

function isEmail(elm) {

	if (isEmailString(elm.value) == false){		

		return false;

	} else {

		return true;

	}

}



//Check that a string is a valid email

function isEmailString(email) {	

	if (email == "") {	

		return false;

	}

	if (email.indexOf(" ") + "" != "-1"){				

		return false;

	}

	if (isComposedOfChars("0123456789abcdefghijklmnopqrstuvwxyz&@.-_",email.toLowerCase()) == false) {

		return false;

	}

	if (email.indexOf("@") + "" == "-1"){

		return false;

	}

	if (email.indexOf("@") !=  email.lastIndexOf("@")){

		return false;

	}

	if (email.indexOf(".") + "" == "-1"){

		return false;

	}

	if (email.indexOf("@") + "" == "0"){

		return false;

	}

	if (email.indexOf(".")  == email.length - 1){

		return false;

	}

	return true;

}





function isComposedOfChars(validChars, inString) {

	return (indexOfFirstNotIn(validChars, inString) == -1);

}



function indexOfFirstNotIn(okayChars, inString) {



  var i;

  for (i=0; i < inString.length; i++) 

  {

    var charm = inString.charAt(i);

    if (okayChars.indexOf(charm) == -1)

    {

      return i;

    }

  }



   return -1;

}



function getRadioButtonValue (radio)

{   

	var radioValue =null;



	for (var i = 0; i < radio.length; i++)

    {   

		if (radio[i].checked) { 



          radioValue = radio[i].value;    

          break; 

       }

    }



    return radioValue;

}



function isComposedOfNum(inString,pwd)

{

	var i;		

	for (i=0; i < inString.length; i++) 

	{

		var charm = inString.charAt(i);

		if (pwd.indexOf(charm) != -1)

			return true;

	}	  

	

	return false;

}



function yourage_f(mm,bday,byear)

{

	thedate = new Date();

	mm2 = thedate.getMonth() + 1;

	dd2 = thedate.getDate();

	yy2 = thedate.getYear();

	///alert("day " + dd2);alert("month " + mm2);alert("Year " + yy2);

	

	yy2 = (yy2 < 2000) ? yy2 + 1900 : yy2;

	

	if (yy2 < 100) yy2 += 1900

	

	//		alert("day " + dd2);alert("month " + mm2);alert("Year " + yy2);



	yourage = yy2 - byear;

	if (mm2 < mm) yourage--;

	if ((mm2 == mm) && (dd2 < bday)) yourage--;

	

	return yourage;

}



function fsopen(url,wname,swidth,sheight,sleft,sstop)

{

	//alert(url);

	window_style= 'resizable=yes,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no, fullscreen=no,dependent=no,width=' + swidth + ',height=' + sheight +',left= ' + sleft + ',top= ' + sstop;

	mewwindow = window.open(url,wname,window_style);

	mewwindow.focus();

}



function clearAll(field,fixValue,check)

{

	//alert(which.length);

	

	for (i = 0; i < field.length; i++) {

	  if((i+1) != check)

      	field[i].checked = false;

	  else

	  {

	  	field[i].checked = true;

		fixValue.value = i+1;

	  }      	

    }	

}



function display(x){

	var c = document.getElementById(x);

	c.style.display = (c.style.display=='none')?'':'none';

}

function coordinates(event)

{

	mousex=event.screenX;

   	mousey=event.screenY - 100;

}

function show_popup(event,msg,swidth,sheight)

{

	coordinates(event);

	pbody.style.border="solid black 1px";

	pbody.style.backgroundColor="#999999";

	pbody.style.color="#FFFFFF";

	pbody.style.textAlign="center";

	pbody.innerHTML= msg;

	p.show(mousex,mousey,swidth,sheight,document.body);

}

function hide_popup()

{

  	p.show(0,0,0,0,document.body);

}



function validate_input(Instring)

{	

	// Filter firstname, lastname, foul language

	if(validate_user_text(Instring) == false)

		return false;

		

	// Filter out special character

	/*

	if(isContainAlphaNumeric(Instring) == false)

	{

		alert("Please do not include special character");

		return false;	

	}	

	*/

	// Filter out Email Address

	if(isContainEmail(Instring))

	{

		alert("Please do not include email address");

		return false;

	}

	

	// Filter out over six number

	if(findsixdigitNumber(Instring))

	{

		alert("Please do not include numbers containing 9 or more digits");

		return false;

	}

	

	

	/* 

	if (Instring.indexOf(" ") + "" != "-1")

	{  

		var sp_field_value = Instring.split(" ");

		

		for(j=0; j<sp_field_value.length;j++)

		{

			if(isNumeric(sp_field_value[j]) && sp_field_value[j].length > 6)   // Check for numberic

			{

				alert("Number cannot over 6 digits");

				return false;

			}

			if(isEmailString(sp_field_value[j]))  // check for email and username

			{

				alert("Please do not include email address");

				return false;

			}

		}

	}	

	else

	{

		if(isNumeric(Instring) && Instring.length > 6)   // Check for numberic

		{

			alert("Number cannot over 6 digits");

			return false;

		}

		if(isEmailString(Instring))  // check for email and username

		{

			alert("Please do not include email address");

			return false;

		}	

	} */

}



function isFloat(number)

{

  number = number + "";

  return ((number.length > 0) && isComposedOfChars(".0123456789", number));

}



function isNumeric(number)

{

  number = number + "";

  return ((number.length > 0) && isComposedOfChars("0123456789", number));

}



<!--- Start of Check whether include first name and last name user ---->



function reset_alert_count()

{

 swear_alert_count=0;

}

function validate_user_text(Instring)

{

	/*

 	reset_alert_count();

	

	 var compare_text=Instring;

	 

	// alert("true  compare_text " + compare_text);

	 for(var p=0; p<swear_words_arr.length; p++)

	 {

		//alert(swear_words_arr[p]);

		

		if(swear_words_arr[p] != "")

		{

			for(var q=0; q<(compare_text.length); q++)

			{

			   if(swear_words_arr[p]==compare_text.substring(q,(q+swear_words_arr[p].length)).toLowerCase())

			   {

				  //alert("true match");

				swear_alert_arr[swear_alert_count]=compare_text.substring(q,(q+swear_words_arr[p].length));

				swear_alert_count++;

			   }

			}

		}	  

	 }

	 var alert_text="";

	 for(var k=1; k<=swear_alert_count; k++)

	 {

	  alert_text+="\n" + "(" + k + ")  " + swear_alert_arr[k-1];

	 }

	 //alert(swear_alert_count);

	 if(swear_alert_count>0)

	 {

	  alert("The form cannot be submitted.\nThe following illegal words were found:\n_______________________________\n" + alert_text + "\n_______________________________");

		return false;

	 }

	 else

	 {

		 */

	  return true;

	 //}

}





<!--- End Of Check whether include first name and last name user ---->





function isContainEmail(str){

  if(isEmpty(str)) return false;

	var re = /^[^\s()<>@,;:\/]+@\w[\w\.-]+\.[a-z]{2,}$/i

	return re.test(str);

}



function isEmpty(str){

  return (str == null) || (str.length == 0);

}



function isContainAlphaNumeric(str){

  var re = /[^a-zA-Z0-9\s.-]/g

  

  if (re.test(str)) return false;

  return true;

}



function findsixdigitNumber(StrObj) {



var sixdigitNumber = StrObj.match(/\d{25}/gi);



	if (sixdigitNumber) 

	{

		if(sixdigitNumber.length >= 1)

		{

			return true;	

		}

	}



	return false;



}



function redirect(url)

{

	window.location.href = url;	

}

	








