function viewImages(url){
			x = (screen.width / 2) - 340;
			y = (screen.height / 2) - 255;
    		newWindow = window.open(url,'AnySite_view_photo','toolbar=no,location=no,scrollbars=yes,resizable=yes,status=no,menubar=no,titlebar=yes,width=640,height=480,left='+x+',top='+y);
    		newWindow.focus();
		}



function popup(url) {
			window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=500,height=450');
		}



function hide_content() {
			if (document.getElementById("content")) {
				document.getElementById("content").style.visibility = "hidden";
			}
		}



function show_content() {
			if (document.getElementById("content")) {
				document.getElementById("content").style.visibility = "visible";
			}
		}
		// hotmail fix....
		if (parent.frames.length > 0) {
			parent.location = self.location;
		}



	
		
function show_message_popupate() {
			show_message();
			radio_click(0);
			
		}


function radio_click(item) {
			for (var index = 0; index <= (document.aspnetForm.elements.length - 1); index++) {
				var question = document.aspnetForm.elements[index];
					if (!item || question.name == item) {
						var question_ident = question.name;
						var sub_itentifier = ("sub_ctl00$ContentPlaceHolder1$" + question_ident + "_" + question.value);
						
						if (document.getElementById(sub_itentifier)) {
							var sub_layer = document.getElementById(sub_itentifier)
							if (question.checked) {
								sub_layer.style.display = "inline";
							} else {
								sub_layer.style.display = "none";
							}
						}
				}
		    }
		}





//function reloadWithAction(action, anchor) {
//			document.application.action = 'http://www.AnySite.com/?setlocation=signup&setstep=1&SID=a89e6866631d78784f00f728cdbe0fa803bc20a8b05e3f420bfa2ed6ced2fc87&setaction=' + action + '#' + anchor;
//			document.application.submit();
//		}








// Begin Format Phone Number
var n;
var p;
var p1;
function ValidatePhone(){
p=p1.value
if(p.length==3){
	pp=p;
	d4=p.indexOf('(')
	d5=p.indexOf(')')
	if(d4==-1){
		pp="("+pp;
	}
	if(d5==-1){
		pp=pp+")";
	}
		p1.value="";
		p1.value=pp;
}
if(p.length>3){
	d1=p.indexOf('(')
	d2=p.indexOf(')')
	if (d2==-1){
		l30=p.length;
		p30=p.substring(0,4);
		p30=p30+")"
		p31=p.substring(4,l30);
		pp=p30+p31;
		p1.value="";
		p1.value=pp;
		
	}
	}
if(p.length>5){
	p11=p.substring(d1+1,d2);
	if(p11.length>3){
	p12=p11;
	l12=p12.length;
	l15=p.length
	p13=p11.substring(0,3);
	p14=p11.substring(3,l12);
	p15=p.substring(d2+1,l15);
	p1.value="";
	pp="("+p13+")"+p14+p15;
	p1.value=pp;
	}
	l16=p.length;
	p16=p.substring(d2+1,l16);
	l17=p16.length;
	if(l17>3&&p16.indexOf('-')==-1){
		p17=p.substring(d2+1,d2+4);
		p18=p.substring(d2+4,l16);
		p19=p.substring(0,d2+1);
	pp=p19+p17+"-"+p18;
	p1.value="";
	p1.value=pp;

	}
}

setTimeout(ValidatePhone,100)
}
function getIt(m){
n=m.name;
p1=document.forms[0].elements[n]
ValidatePhone()
}

//  End Format Phone Number


//BEGIN SPECIAL VALIDATION
var mikExp = /[$\\@\\\#%\^\&\*\(\)\[\]\+\_\{\}\`\~\=\|a b c d e f g h i j k l m n o p q r s t u v w x y z]/;
function dodacheck(val) {
var strPass = val.value;
var strLength = strPass.length;
var lchar = val.value.charAt((strLength) - 1);
if(lchar.search(mikExp) != -1) {
var tst = val.value.substring(0, (strLength) - 1);
val.value = tst;
   }
}
function doanothercheck(form) {
if(form.value.length < 1) {
alert("Please enter something.");
return false;
}
if(form.value.search(mikExp) == -1) {
alert("Correct Input");
return false;
}
else {
alert("Sorry, but the following characters\n\r\n\r@ $ % ^ & * # ( ) [ ] \\ { + } ` ~ =  | \n\r\n\rare not allowed!\n");
form.select();
form.focus();
return false;
}
alert("Correct Input");
return false;
}
//  End


//Begin Format Currency
function formatCurrency(num) {
num = num.toString().replace(/\$|\,/g,'');
if(isNaN(num))
num = "0";
sign = (num == (num = Math.abs(num)));
num = Math.floor(num*100+0.50000000001);
cents = num%100;
num = Math.floor(num/100).toString();
if(cents<10)
cents = "0" + cents;
for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
num = num.substring(0,num.length-(4*i+3))+','+
num.substring(num.length-(4*i+3));
return (((sign)?'':'-') + '$' + num + '.' + cents);
}
//  End Format Currency 

function checkdate(objName) {
var datefield = objName;
if (chkdate(objName) == false) {
datefield.select();
alert("That date is invalid.  Please try again.");
datefield.focus();
return false;
}
else {
return true;
   }
}
function chkdate(objName) {
var strDatestyle = "US"; 
var strDate;
var strDateArray;
var strDay;
var strMonth;
var strYear;
var intday;
var intMonth;
var intYear;
var booFound = false;
var datefield = objName;
var strSeparatorArray = new Array("-"," ","/",".");
var intElementNr;
var err = 0;
var strMonthArray = new Array(12);
strMonthArray[0] = "Jan";
strMonthArray[1] = "Feb";
strMonthArray[2] = "Mar";
strMonthArray[3] = "Apr";
strMonthArray[4] = "May";
strMonthArray[5] = "Jun";
strMonthArray[6] = "Jul";
strMonthArray[7] = "Aug";
strMonthArray[8] = "Sep";
strMonthArray[9] = "Oct";
strMonthArray[10] = "Nov";
strMonthArray[11] = "Dec";
strDate = datefield.value;
if (strDate.length < 1) {
return true;
}
for (intElementNr = 0; intElementNr < strSeparatorArray.length; intElementNr++) {
if (strDate.indexOf(strSeparatorArray[intElementNr]) != -1) {
strDateArray = strDate.split(strSeparatorArray[intElementNr]);
if (strDateArray.length != 3) {
err = 1;
return false;
}
else {
strDay = strDateArray[0];
strMonth = strDateArray[1];
strYear = strDateArray[2];
}
booFound = true;
   }
}
if (booFound == false) {
if (strDate.length>5) {
strDay = strDate.substr(0, 2);
strMonth = strDate.substr(2, 2);
strYear = strDate.substr(4);
   }
}
if (strYear.length == 2) {
strYear = '20' + strYear;
}
// US style
if (strDatestyle == "US") {
strTemp = strDay;
strDay = strMonth;
strMonth = strTemp;
}
intday = parseInt(strDay, 10);
if (isNaN(intday)) {
err = 2;
return false;
}
intMonth = parseInt(strMonth, 10);
if (isNaN(intMonth)) {
for (i = 0;i<12;i++) {
if (strMonth.toUpperCase() == strMonthArray[i].toUpperCase()) {
intMonth = i+1;
strMonth = strMonthArray[i];
i = 12;
   }
}
if (isNaN(intMonth)) {
err = 3;
return false;
   }
}
intYear = parseInt(strYear, 10);
if (isNaN(intYear)) {
err = 4;
return false;
}
if (intMonth>12 || intMonth<1) {
err = 5;
return false;
}
if ((intMonth == 1 || intMonth == 3 || intMonth == 5 || intMonth == 7 || intMonth == 8 || intMonth == 10 || intMonth == 12) && (intday > 31 || intday < 1)) {
err = 6;
return false;
}
if ((intMonth == 4 || intMonth == 6 || intMonth == 9 || intMonth == 11) && (intday > 30 || intday < 1)) {
err = 7;
return false;
}
if (intMonth == 2) {
if (intday < 1) {
err = 8;
return false;
}
if (LeapYear(intYear) == true) {
if (intday > 29) {
err = 9;
return false;
}
}
else {
if (intday > 28) {
err = 10;
return false;
}
}
}
if (strDatestyle == "US") {
datefield.value = strMonthArray[intMonth-1] + " " + intday+" " + strYear;
}
else {
datefield.value = intday + " " + strMonthArray[intMonth-1] + " " + strYear;
}
return true;
}
function LeapYear(intYear) {
if (intYear % 100 == 0) {
if (intYear % 400 == 0) { return true; }
}
else {
if ((intYear % 4) == 0) { return true; }
}
return false;
}


function IsNumeric(fieldName)
   //  check for valid numeric strings	
   {
   var numericfield = fieldName;
   var strValidChars = "0123456789.-";
   var strChar;
   var blnResult = true;
   var fieldValue = fieldName.value;

   //  test strString consists of valid characters listed above
   for (i = 0; i < fieldValue.length && blnResult == true; i++)
      {
      strChar = fieldValue.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         alert("That number is invalid.  Please try again.");
         numericfield.focus();
         blnResult = false;
         return blnResult;
         }
      }
   return blnResult;
   }

  // -->










