function tributeaccepet(id,no,name){var retn=confirm("Would you like to accept tribute?");if(retn==true){document.location.href="tributefun.php?act=accept&no="+no}}function tributeoverride(id,no){var retn=confirm("Would you like to override the current tribute?");if(retn==true){document.location.href="tributefun.php?act=override&no="+no}}function tributedecline(id,no,name,root){var retn=confirm("Do you want to remove this tribute completely?");if(retn==true){document.location.href="tributefun.php?act=decline&no="+no}}function responsedelete(id,sid,no,name){var retn=confirm("Would you like to delete response?");if(retn==true){document.location.href="tributefun.php?act=delete&no="+no}}function CleanUp(){var retn=confirm("Would you like YMMMF to clean up your folders and delete the inactive profiles?");if(retn==true){document.location.href="tributefun.php?act=clean"}}function ClsPop(){top.window.location.reload()}function ProRemove(id){var retn=confirm("Would you like to remove this recommended profile?");if(retn==true){document.location.href="tributefun.php?act=remove&id="+id}}function ProRemoveUser(id,pname,qstr){var retn=confirm("Would you like to remove this profile?");if(retn==true){document.location.href=pname+"?"+qstr+"&do=removeuser&rmid="+id}}function ProUnremoveUser(id,pname,qstr){var retn=confirm("Would you like to unremove this profile?");if(retn==true){document.location.href=pname+"?"+qstr+"&do=unremoveuser&rmid="+id}}function ProUnblockUser(id,pname,qstr){var retn=confirm("Would you like to unblock this profile?");if(retn==true){document.location.href=pname+"?"+qstr+"&do=unblockuser&rmid="+id}}function AddFavorUser(id){var retn=confirm("Would you like to add this profile to your favourites?");if(retn==true){document.frmprof.return_url.value=document.location.href;document.frmprof.action="tributefun.php?act=addfover&id="+id;document.frmprof.method="POST";document.frmprof.submit()}}function AddRmvFavorUser(id){var retn=confirm("Would you like to remove this profile from your favourites?");if(retn==true){document.frmprofdel.return_url.value=document.location.href;document.frmprofdel.action="tributefun.php?act=rmvfover&id="+id;document.frmprofdel.method="POST";document.frmprofdel.submit()}}function BlockFromUser(id){var retn=confirm("Do you want to block this profile from future contact?");if(retn==true){document.frmblkcnt.return_url1.value=document.location.href;document.frmblkcnt.action="tributefun.php?act=blkusr&id="+id;document.frmblkcnt.method="POST";document.frmblkcnt.submit()}}function UnBlockFromUser(id){var retn=confirm("Do you want to unblock this profile from future contact?");if(retn==true){document.frmblkcnt.return_url1.value=document.location.href;document.frmblkcnt.action="tributefun.php?act=unblkusr&id="+id;document.frmblkcnt.method="POST";document.frmblkcnt.submit()}}function blkuser(id){var retn=confirm("Do you want to block this profile from future contact?");if(retn==true){document.location.href="tributefun.php?act=blkusr&id="+id}}function RmvFavorUser(id,pname,qstr){var retn=confirm("Would you like to remove this profile from your favourites?");if(retn==true){document.location.href=pname+"?"+qstr+"&do=removefavor&fid="+id}}function MoveToTop(id){var retn=confirm("Would you like to move this profile to your top spot?");if(retn==true){document.location.href="tributefun.php?act=moveto&id="+id}}function DelNote(id){var retn=confirm("Do you want to delete note from this profile?");if(retn==true){document.location.href="tributefun.php?act=delnote&id="+id}}function createRequestObject(){if(window.XMLHttpRequest&&!(window.ActiveXObject)){return new XMLHttpRequest()}else if(window.ActiveXObject){try{return new ActiveXObject('MSXML2.XMLHTTP')}catch(e){return new ActiveXObject('Microsoft.XMLHTTP')}}}var http=createRequestObject();function handleResponse(){if(http.readyState==4){var response=http.responseText;var update=new Array();var up2=new Array();if(response.indexOf('|||'!=-1)){update=response.split('|||');for(var i=1;i<update.length;i++){up2=update[i].split("|:|");document.getElementById(up2[0]).innerHTML=up2[1]}}}}if(use_popups==undefined){var use_popups=true}function isValidEmail(fieldValue){if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,7})+$/.test(fieldValue))return true;return false}function isValidURL(url){if(url==null)return false;var reg='^ *';reg=reg+'(?:([Hh][Tt][Tt][Pp](?:[Ss]?))(?:\:\\/\\/))?';reg=reg+'(?:(\\w+\\:\\w+)(?:\\@))?';reg=reg+'([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}|localhost|([Ww][Ww][Ww].|[a-zA-Z0-9].)[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,6})';reg=reg+'(\\:\\d+)?';reg=reg+'((?:\\/.*)*\\/?)?';reg=reg+'(.*?\\.(\\w{2,4}))?';reg=reg+'(\\?(?:[^\\#\\?]+)*)?';reg=reg+'(\\#.*)?';reg=reg+' *$';return url.match(reg)}function isValidString(checkStr,checkOK){if(!checkOK)var checkOK='';var allValid=true;for(i=0;i<checkStr.length;i++){ch=checkStr.charAt(i);for(j=0;j<checkOK.length;j++)if(ch==checkOK.charAt(j))break;if(j==checkOK.length){allValid=false;break}}return allValid}var alphabeticChars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";var numericChars="0123456789";function isNumeric(fieldValue){if(/[0-9]/.test(fieldValue))return true;return false}function isNumeric(val,addChars){return isValidString(val,numericChars+addChars)}function isAlphabetic(val){if(/[A-Za-z]/.test(val))return true;return false}function isAlphabetic(val,addChars){return isValidString(val,alphabeticChars+addChars)}function isAlphaNumeric(val){if(/\w/.test(val))return true;return false}function isAlphaNumeric(val,addChars){return isValidString(val,alphabeticChars+numericChars+addChars)}function DispDispHide(disp1,disp2,hide){if(hide)hide.style.display='none';if(disp1)disp1.style.display='inline';if(disp2)disp2.style.display='inline'}function DispHideHide(disp,hide1,hide2){if(hide1)hide1.style.display='none';if(hide2)hide2.style.display='none';if(disp)disp.style.display='inline'}function showHide(paramA,paramB){if(paramA.value=='US')paramB.rows['row_usstates'].style.display='inline';else paramB.rows['row_usstates'].style.display='none';if(paramA.value=='CA')paramB.rows['row_castates'].style.display='inline';else paramB.rows['row_castates'].style.display='none';if(paramA.value=='AU')paramB.rows['row_austates'].style.display='inline';else paramB.rows['row_austates'].style.display='none';if(paramA.value=='GB')paramB.rows['row_gbstates'].style.display='inline';else paramB.rows['row_gbstates'].style.display='none'}function showHide(paramA){if(paramA=='US'){document.getElementById('row_usstates').style.display='inline'}else{document.getElementById('row_usstates').style.display='none'}if(paramA=='CA'){document.getElementById('row_castates').style.display='inline'}else{document.getElementById('row_castates').style.display='none'}if(paramA=='AU'){document.getElementById('row_austates').style.display='inline'}else{document.getElementById('row_austates').style.display='none'}if(paramA=='GB'){document.getElementById('row_gbstates').style.display='inline'}else{document.getElementById('row_gbstates').style.display='none'}}function showHidePref(paramA,paramB){if(paramA.value=='US'){paramB.rows['row_lookusstates'].style.display='inline'}else{paramB.rows['row_lookusstates'].style.display='none'}if(paramA.value=='CA'){paramB.rows['row_lookcastates'].style.display='inline'}else{paramB.rows['row_lookcastates'].style.display='none'}if(paramA.value=='AU'){paramB.rows['row_lookaustates'].style.display='inline'}else{paramB.rows['row_lookaustates'].style.display='none'}if(paramA.value=='GB'){paramB.rows['row_lookgbstates'].style.display='inline'}else{paramB.rows['row_lookgbstates'].style.display='none'}}function showHidePref(paramA){if(paramA=='US'){document.getElementById('row_lookusstates').style.display='inline'}else{document.getElementById('row_lookusstates').style.display='none'}if(paramA=='CA'){document.getElementById('row_lookcastates').style.display='inline'}else{document.getElementById('row_lookcastates').style.display='none'}if(paramA=='AU'){document.getElementById('row_lookaustates').style.display='inline'}else{document.getElementById('row_lookaustates').style.display='none'}if(paramA=='GB'){document.getElementById('row_lookgbstates').style.display='inline'}else{document.getElementById('row_lookgbstates').style.display='none'}}function openWin(id){if(use_popups==false){window.location.href='viewresult.php?pollid='+id;return}var width=550;var height=378;var left=(screen.width/2)-width/2;var top=(screen.height/2)-height/2;openpopup=window.open('viewresult.php?pollid='+id,'','width='+width+',height='+height+',left='+left+',top='+top+',resizable=yes,scrollbars=yes,status=no');openpopup.opener.name='abc'}function previousPolls(){if(use_popups==false){window.location.href='previouspolls.php';return}var width=600;var height=378;var left=(screen.width/2)-width/2;var top=(screen.height/2)-height/2;openpopup=window.open('previouspolls.php','popupwin','width='+width+',height='+height+',left='+left+',top='+top+',resizable=yes,scrollbars=yes,status=no');openpopup.opener.name="abc"}function launchTellFriend(){if(use_popups==false){window.location.href='tellafriend.php';return}var left=(screen.width/2)-400/2;var top=(screen.height/2)-400/2;var win="width=300,height=250,left="+left+",top="+top+",copyhistory=no,directories=no,menubar=no,location=no,resizable=yes,scrollbars=no";window.open("tellafriend.php",'tellfriend',win)}function launchTellFriendProfile(sID){if(use_popups==false){window.location.href='tellafriend.php?ID='+sID;return}var left=(screen.width/2)-280/2;var top=(screen.height/2)-280/2;var win="width=280,height=300,left="+left+",top="+top+",copyhistory=no,directories=no,menubar=no,location=no,resizable=yes,scrollbars=yes";window.open("tellfriend.php?ID="+sID,'tellfriendprofile',win)}var popUpWin=0;function popUpWindow(URLStr,left,top,width,height){if(use_popups==false){window.location.href=URLStr;return}if(popUpWin){if(!popUpWin.closed){popUpWin.close()}}popUpWin=open(URLStr,'popUpWin','toolbar=no,location=yes,directories=no,status=no,menubar=no,scrollbar=no,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'')}function popUpWindowMessage(URLStr,align,width,height,msgid){width=450;height=450;if(use_popups==false){window.location.href=URLStr;return}if(align=='center'){var left=(screen.width/2)-width/2;var top=(screen.height/2)-height/2}else{var left=0;var top=0}popUpWin=open(URLStr,'popUpWin'+msgid,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'')}function showIM(msgid){popUpWindow('showinstantmsg.php?id='+msgid,'center',320,260,msgid)}function popUpWindow(URLStr,align,width,height,msgid){if(use_popups==false){window.location.href=URLStr;return}if(align=='center'){var left=(screen.width/2)-width/2;var top=(screen.height/2)-height/2}else{var left=0;var top=0}popUpWin=open(URLStr,'popUpWin'+msgid,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'')}function popUpScrollWindow(URLStr,align,width,heightParam){if(use_popups==false){window.location.href=URLStr;return}height=screen.height-150;height=Math.min(height,heightParam);if(align=='center'){var left=(screen.width/2)-width/2;var top=(screen.height/2)-height/2}else if(align=='top'){var left=(screen.width/2)-width/2;var top=0}else{var left=0;var top=0}popUpWin=open(URLStr,'popUpWin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');popUpWin.opener.name="abc1"}function popUpScrollWindow2(URLStr,align,width,heightParam){var use_profilepopups=false;if(use_profilepopups==false){window.location.href=URLStr;return}height=screen.height-150;height=Math.min(height,heightParam);if(align=='center'){var left=(screen.width/2)-width/2;var top=(screen.height/2)-height/2}else if(align=='top'){var left=(screen.width/2)-width/2;var top=0}else{var left=0;var top=0}popUpWin=open(URLStr,'popUpWin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');popUpWin.opener.name="abc1"}var prevRow=null;function toggleRow(rwId,num){if(prevRow!=null){prevRow.style.display='none'}prevRow=obj=document.getElementById(rwId);obj.style.display='inline';for(i=0;i<document.getElementById('tblSelect').length;i++){if(i==num){document.getElementById('tblSelect')[i].className="s_table_blue"}else{document.getElementById('tblSelect')[i].className="s_table_white"}}}function votesubmit(id,curtime){var width=600;var height=378;var left=(screen.width/2)-width/2;var top=(screen.height/2)-height/2;nop=document.frmpoll.rdo.length;var i,rdo;rdo='0';for(i=0;i<nop;i++){if(document.frmpoll.rdo[i].checked){rdo=document.frmpoll.rdo[i].value}}if(use_popups==false){if(rdo==""){window.location.href='viewresult.php?t='+curtime+'&pollid='+id}else{window.location.href='votehere.php?t='+curtime+'&rdo='+rdo+'&pollid='+id}return}if(rdo==""){openpopup=window.open('viewresult.php?t='+curtime+'&pollid='+id,'','width='+width+',height='+height+',left='+left+',top='+top+',resizable=yes,scrollbars=yes,status=no');openpopup.opener.name='abc'}else{openpopup=window.open('votehere.php?t='+curtime+'&rdo='+rdo+'&pollid='+id,'','width='+width+',height='+height+',left='+left+',top='+top+',resizable=yes,scrollbars=yes,status=no');openpopup.opener.name='abc'}}function selectRdo(form,rdo){for(i=0;i<form.length;i++){if(form.elements[i].type=='radio'&&form.elements[i].name=='searchby'&&form.elements[i].value==rdo){form.elements[i].checked=true}}}function checkAll(form,name,val){for(i=0;i<form.length;i++){if(form.elements[i].type=='checkbox'&&form.elements[i].name==name){form.elements[i].checked=val}}}function datefromtovalid(sy,sm,sd,ey,em,ed,msg){month=new Array("JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC");var syear=sy[sy.selectedIndex].value;var smonth=sm[sm.selectedIndex].value;var sdays=sd[sd.selectedIndex].value;var eyear=ey[ey.selectedIndex].value;var emonth=em[em.selectedIndex].value;var edays=ed[ed.selectedIndex].value;for(var count=0;count<12;count++){if((smonth==month[count])){smonth=count}if((emonth==month[count])){emonth=count}}from_date=new Date(syear,smonth,sdays);to_date=new Date(eyear,emonth,edays);if(from_date>to_date){alert(msg);return false}return true}function DateCheck(syr,smt,sdt,msg){hdt=sdt[sdt.selectedIndex].value;hmt=smt[smt.selectedIndex].value;hyr=syr[syr.selectedIndex].value;hms_maxval=31;if((hmt=="APR")||(hmt=="JUN")||(hmt=="SEP")||(hmt=="NOV")){hms_maxval=30}if((hmt=="FEB")&&(hyr%4)==0){hms_maxval=29}if((hmt=="FEB")&&(hyr%4)!=0){hms_maxval=28}if(parseInt(hdt)>hms_maxval){alert(msg);return false}return true}function validateLogin(form){ErrorMsg=new Array();ErrorMsg[0]="------------------------- The Following Errors Occured -------------------------"+String.fromCharCode(13);CheckFieldString("noblank",form.txtusername,"{$lang.signup_js_errors.username_noblank}");CheckFieldString("noblank",form.txtpassword,"{$lang.signup_js_errors.password_noblank}");CheckFieldString("alphanum",form.txtusername,"{$lang.signup_js_errors.username_charset}");CheckFieldString("alphanum",form.txtpassword,"{$lang.signup_js_errors.password_charset}");result="";if(ErrorCount>0){alert(ErrorMsg[1]);return false}return true}function confirmLink(theLink,theMessage){var is_confirmed=confirm(theMessage);if(is_confirmed){theLink.href+='&delete=Y'}return is_confirmed}function confirmButton(theMessage){var is_confirmed=confirm(theMessage);return is_confirmed}function countCheck(countLimit){if(document.frmCmt.comment.value.length>countLimit){alert('Too many characters in the comment box!');document.frmCmt.comment.focus();return false}else return true}function countText(countLimit){var old=document.frmCmt.counter.value;document.frmCmt.counter.value=document.frmCmt.comment.value.length;if(document.frmCmt.counter.value>countLimit&&old<=countLimit){alert('Too many characters in the comment box!');if(document.styleSheets){document.frmCmt.counter.style.fontWeight='bold';document.frmCmt.counter.style.color='#ff0000'}}else if(document.frmCmt.counter.value<=countLimit&&old>countLimit&&document.styleSheets){document.frmCmt.counter.style.fontWeight='normal';document.frmCmt.counter.style.color='#000000'}}function openInParentWindow(url){window.opener.document.location.href=url;window.opener.focus()}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 cleanNoLongerAvailUser(nolongId)
{
	alert("Profile no longer available");
}
function valfocus()
{
if(document.getElementById('lookpincode').value=="Type ZIPCODE here")
{
document.getElementById('lookpincode').value="";
document.getElementById('txtlookpincode').value="";
return true;
}

}
function valblur()
{
if(document.getElementById('lookpincode').value=="")
{
document.getElementById('lookpincode').value="Type ZIPCODE here";
document.getElementById('txtlookpincode').value="";
return true;
}
}

function retfocus()
{
if(document.getElementById('dlocation').value=="Type ZIPCODE here")
{
document.getElementById('dlocation').value="";
document.getElementById('location').value="";
return true;
}

}
function retblur()
{
if(document.getElementById('dlocation').value=="")
{
document.getElementById('dlocation').value="Type ZIPCODE here";
document.getElementById('location').value="";
return true;
}
}



function editfocus()
{
if(document.getElementById('dlocation').value=="Type ZIPCODE here" )
{
document.getElementById('dlocation').value="";
document.getElementById('location').value="";
return true;
}

}
function editblur()
{
if(document.getElementById('dlocation').value=="")
{
document.getElementById('dlocation').value="Type ZIPCODE here";
document.getElementById('location').value="";
return true;
}
}


<!-- AJAX.JS file scripts -->
var pno;var sec;var xmlHttp;var xmlHttpPost;var xmlHttp1Post;function GetPost(flag,rst){
var fid=flag;
var getrst=rst;
var txtlookpincode; var txtlookpincodeus;
if(getrst==1)
{
if(document.getElementById('sellookpincode').value!="")
{
document.getElementById('sellookpincode').value="";
}
if(document.getElementById('lookpincodeus').value!="")
{
document.getElementById('lookpincodeus').value="";
}
}
//alert(fid);

txtlookpincode = document.getElementById('sellookpincode').value;
txtlookpincodeus = document.getElementById('lookpincodeus').value

checkbrow1();
url="getpostcode.php?sellookpincode="+txtlookpincode+ "&fid="+fid+ "&lookpincodeus="+txtlookpincodeus;
// alert(url);
xmlHttpPost.onreadystatechange=function(){document.getElementById('getpost').innerHTML = "<img src='images/working.gif'/>";if(xmlHttpPost.readyState==4){
document.getElementById('getpost').innerHTML=xmlHttpPost.responseText;

$j(document).ready(function()
  {
    
  function formatItem(row)
  {
	return row[0];
  }
 
    $j("#lookpincode").autocomplete("getpostcode.php?type=2", {
    minChars: 1,
    width: 200,
    multiple: false,
   // matchContains: true,
    formatItem: formatItem
  //  formatResult: formatResult
  	});
  });

$j("#lookpincode").result(function(event, data, formatted) {
                if (data)
		
                  $j("#txtlookpincode").val(data[1])
        });



}}

xmlHttpPost.open("GET",url,true);xmlHttpPost.send(null);}





//RetPost starts here
function RetPost(flag)
{
var fid=flag;

//Check the browser support
try{
xmlHttp2Post=new XMLHttpRequest()
}
catch(e)
{
try
{xmlHttp2Post=new ActiveXObject("Msxml2.XMLHTTP")
}catch(e)
{
try{xmlHttp2Post=new ActiveXObject("Microsoft.XMLHTTP")
}catch(e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
//Check the browser support
url= "retrievepostcode.php?fid="+fid;
xmlHttp2Post.onreadystatechange=function(){
document.getElementById('retpost').innerHTML = "<img src='images/working.gif'/>";
if(xmlHttp2Post.readyState==4)
{
document.getElementById('retpost').innerHTML=xmlHttp2Post.responseText;


// Signup jquery starts here
$j(document).ready(function()
  {
    
  function formatItem(row)
  {
	return row[0];
  }
 
    $j("#dlocation").autocomplete("retrievepostcode.php?type=2", {
    minChars: 1,
    width: 200,
    multiple: false,
   // matchContains: true,
    formatItem: formatItem
  //  formatResult: formatResult
  	});
  });
$j("#dlocation").result(function(event, data, formatted) {
                if (data)
		
                  $j("#location").val(data[1])
        });
//Signup jquery ends here
if(document.frmSignup)
{
var myFormValidation = new Validatea('frmSignup',{
errorClass: 'red'
});
}
}}

xmlHttp2Post.open("GET",url,true);xmlHttp2Post.send(null);



}
//RetPost ends here//




//addfriend starts here//
function AddPost(flag)
{

var fid=flag;
var xmlHttp3Post;
//Check the browser support
try{
xmlHttp3Post=new XMLHttpRequest()
}
catch(e)
{
try
{xmlHttp3Post=new ActiveXObject("Msxml2.XMLHTTP")
}catch(e)
{
try{xmlHttp3Post=new ActiveXObject("Microsoft.XMLHTTP")
}catch(e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
//Check the browser support
url= "addfrdpostcode.php?fid="+fid;
xmlHttp3Post.onreadystatechange=function(){
document.getElementById('addpost').innerHTML = "<img src='images/working.gif'/>";
if(xmlHttp3Post.readyState==4)
{
document.getElementById('addpost').innerHTML=xmlHttp3Post.responseText;


// addfriend jquery starts here
$j(document).ready(function()
  {
    
  function formatItem(row)
  {
	return row[0];
  }
 
    $j("#dlocation").autocomplete("retrievepostcode.php?type=2", {
    minChars: 1,
    width: 200,
    multiple: false,
   // matchContains: true,
    formatItem: formatItem
  //  formatResult: formatResult
  	});
  });
$j("#dlocation").result(function(event, data, formatted) {
                if (data)
		
                  $j("#location").val(data[1])
        });
//addfriend jquery ends here
if(document.frmSignup)
{
var myFormValidation = new Validatea('frmSignup',{
errorClass: 'red'
});
}
}}
xmlHttp3Post.open("GET",url,true);xmlHttp3Post.send(null);
}
//addfriend  ends here//




//Edituser starts here//
function EditPost(flag)
{

var fid=flag;
var xmlHttp4Post;
//Check the browser support
try{
xmlHttp4Post=new XMLHttpRequest()
}
catch(e)
{
try
{xmlHttp4Post=new ActiveXObject("Msxml2.XMLHTTP")
}catch(e)
{
try{xmlHttp4Post=new ActiveXObject("Microsoft.XMLHTTP")
}catch(e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
//Check the browser support
url= "editfrdpostcode.php?fid="+fid;
xmlHttp4Post.onreadystatechange=function(){
if(document.getElementById('editpost') !=null)
{
document.getElementById('editpost').innerHTML = "<img src='images/working.gif'/>";
}
if(xmlHttp4Post.readyState==4)
{
if(document.getElementById('editpost')!=null)
{
document.getElementById('editpost').innerHTML=xmlHttp4Post.responseText;
}


// edituser jquery starts here
$j(document).ready(function()
  {
    
  function formatItem(row)
  {
	return row[0];
  }
 
    $j("#dlocation").autocomplete("editfrdpostcode.php?type=2", {
    minChars: 1,
    width: 200,
    multiple: false,
   // matchContains: true,
    formatItem: formatItem
  //  formatResult: formatResult
  	});
  });
$j("#dlocation").result(function(event, data, formatted) {
                if (data)
		
                  $j("#location").val(data[1])
        });
if(document.frmEditUser)
{
var myFormValidation = new Validatea('frmEditUser',{
errorClass: 'red'

});
}
}}
xmlHttp4Post.open("GET",url,true);xmlHttp4Post.send(null);
}
//edituser  ends here//


//Edituser admin starts here//
function EditPostAdm(flag,user)
{

var fid=flag;
var uid=user;
var xmlHttp4Post;
//Check the browser support
try{
xmlHttp4Post=new XMLHttpRequest()
}
catch(e)
{
try
{xmlHttp4Post=new ActiveXObject("Msxml2.XMLHTTP")
}catch(e)
{
try{xmlHttp4Post=new ActiveXObject("Microsoft.XMLHTTP")
}catch(e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
//Check the browser support

url= "editfrdpostcode.php?fid="+fid+"&edit="+uid;
xmlHttp4Post.onreadystatechange=function(){
document.getElementById('editpost').innerHTML = "<img src='images/working.gif'/>";
if(xmlHttp4Post.readyState==4)
{
document.getElementById('editpost').innerHTML=xmlHttp4Post.responseText;


// edituser jquery starts here
$j(document).ready(function()
  {
    
  function formatItem(row)
  {
	return row[0];
  }
 
    $j("#dlocation").autocomplete("editfrdpostcode.php?type=2", {
    minChars: 1,
    width: 200,
    multiple: false,
   // matchContains: true,
    formatItem: formatItem
  //  formatResult: formatResult
  	});
  });
$j("#dlocation").result(function(event, data, formatted) {
                if (data)
		
                  $j("#location").val(data[1])
        });

var myFormValidation = new Validatea('frmEditUser',{
errorClass: 'red'

});
}}
xmlHttp4Post.open("GET",url,true);xmlHttp4Post.send(null);
}
//edituser admin ends here//



//function to search user profiles in admin
function searchResult(sortVal,typeVal,offsetVal,profileId,confirmMsg)
{
	if(document.getElementById('txtsearch').value =='')
	{
		alert("Please enter search keyword");
		return false;
	}
	if(profileId)
	{
		var confirmVal = confirm(confirmMsg);
		if(confirmVal == false)
		{
			return false;
		}
	}
	
	var xmlHttp4Post;
	//Check the browser support
	try{
	xmlHttp4Post=new XMLHttpRequest()
	}
	catch(e)
	{
	try
	{xmlHttp4Post=new ActiveXObject("Msxml2.XMLHTTP")
	}catch(e)
	{
	try{xmlHttp4Post=new ActiveXObject("Microsoft.XMLHTTP")
	}catch(e)
	{
	alert("Your browser does not support AJAX!");
	return false;
	}
	}
	}
	var pageName = document.getElementById('pageName').value;
	var searchKeyword = document.getElementById('txtsearch').value;
	
	if(profileId == '')
	url= pageName+".php?txtsearch="+searchKeyword+'&sort='+sortVal+'&type='+typeVal+'&offset='+offsetVal;
	else
	url= pageName+".php?txtsearch="+searchKeyword+'&sort='+sortVal+'&type='+typeVal+'&offset='+offsetVal+'&txtdelete='+profileId;
	
	xmlHttp4Post.onreadystatechange=function(){
	if(xmlHttp4Post.readyState==4)
	{
	document.getElementById('searchResultId').innerHTML=xmlHttp4Post.responseText;
	}}
	xmlHttp4Post.open("GET",url,true);xmlHttp4Post.send(null);
}





function make_primary(pno){ checkbrow();var url="setphotorder.php";url=url+"?pno="+pno+"&action";
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){document.getElementById('primary').innerHTML=xmlHttp.responseText;}}
xmlHttp.open("GET",url,true);xmlHttp.send(null);}function showME(data){ checkbrow();var url="howuse.php";url=url+"?data="+data; 
xmlHttp.onreadystatechange=function(){	document.getElementById("ajax_response_user").innerHTML = "<p align='center'><img src='images/working.gif' align='middle'  title='Loading data...'/><br><br> <b>Please wait while we are loading data....</b></p>";if(xmlHttp.readyState==4){     document.getElementById("ajax_response_user").innerHTML = xmlHttp.responseText;}}
xmlHttp.open("GET",url,true);xmlHttp.send(null);}function show_guide(data){ checkbrow();var url="useguide.php";url=url+"?data="+data;
xmlHttp.onreadystatechange=function(){	document.getElementById("ajax_response_user").innerHTML = "<p align='center'><img src='images/working.gif' align='middle'  title='Loading data...'/><br><br> <b>Please wait while we are loading data....</b></p>";if(xmlHttp.readyState==4){     document.getElementById("ajax_response_user").innerHTML = xmlHttp.responseText;}}
xmlHttp.open("GET",url,true);xmlHttp.send(null);}function show_qns(data){ checkbrow();var url="guideclick.php";url=url+"?data="+data;
xmlHttp.onreadystatechange=function(){	document.getElementById("ajax_response_user").innerHTML = "<p align='center'><img src='images/working.gif' align='middle'  title='Loading data...'/><br><br> <b>Please wait while we are loading data....</b></p>";if(xmlHttp.readyState==4){     document.getElementById("ajax_response_user").innerHTML = xmlHttp.responseText;}}
xmlHttp.open("GET",url,true);xmlHttp.send(null);}function Chk_sessionset(){checkbrow2();var url="showpage.php?flag=sessionset&amp;sid="+Math.random();
xmlHttp1Post.onreadystatechange=function(){if(xmlHttp1Post.readyState==4){top.document.frmQuickSearch.submit();}}
xmlHttp1Post.open("GET",url,true);xmlHttp1Post.send(null);}function make_ppp(id, type, offset){   var retn;if(type == '1'){retn=confirm("Would you like to select this profile as a pretty perfect?");}else if(type == '2'){retn=confirm("Would you like to select this profile as a pretty pants?");}else{retn=confirm("Would you like to remove this pretty pants or perfect?");}if(retn==true){checkbrow();var url="getlastest.php?pname=ppp";url=url+"&id="+id+"&type="+type;
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){document.location.href="approved_profiles.php?offset="+offset;}}
xmlHttp.open("GET",url,true);xmlHttp.send(null);}}function showmelastest(pname){checkbrow();var url="getlastest.php?pname="+pname;
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){var id1 = xmlHttp.responseText;showprofile(id1);}}
xmlHttp.open("GET",url,true);xmlHttp.send(null);}function search_x(){checkbrow();var url="search_x.php";
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){document.getElementById('search').innerHTML=xmlHttp.responseText;}}
xmlHttp.open("GET",url,true);xmlHttp.send(null);}function search_rtn(){checkbrow();var url="search_x.php";url=url+"?rtn";
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){document.getElementById('search').innerHTML=xmlHttp.responseText;}}
xmlHttp.open("GET",url,true);xmlHttp.send(null);}function make_secondary(pno){checkbrow();var url="setphotorder.php";url=url+"?pno="+pno;
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){document.getElementById('secondary').innerHTML=xmlHttp.responseText;}}
xmlHttp.open("GET",url,true);xmlHttp.send(null);}function lookmee(l){document.location.href="select_page.php?errid=35&"+l;}function lookfend(){checkbrow();var url="register.php?act=no";
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){document.getElementById('lookme').innerHTML=xmlHttp.responseText;}}
xmlHttp.open("GET",url,true);xmlHttp.send(null);}function inbox(id){checkbrow();var url="imageaction.php";var pagename="flagset";url=url+"?id="+id+"&pagename="+pagename;
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){document.getElementById('imagetype'+id).innerHTML=xmlHttp.responseText;}}
xmlHttp.open("GET",url,true);xmlHttp.send(1);}function previousinbox(id){checkbrow();var pagename="flagreset";var url="imageaction.php";url=url+"?id="+id+"&pagename="+pagename;
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){document.getElementById('resetimage'+id).innerHTML=xmlHttp.responseText;}}
xmlHttp.open("GET",url,true);xmlHttp.send(1);}function Ajaxaddfavor(id){var retn=confirm("Would you like to add this profile to your favourites?");if(retn==true){checkbrow();var url="tributefun.php?act=addfover&id="+id;
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){Ajaxdispfavor();}}
xmlHttp.open("GET",url,true);xmlHttp.send(null);}}function Ajaxrmvfavor(id){var retn=confirm("Would you like to remove this profile from your favourites?");if(retn==true){checkbrow();var url="tributefun.php?act=rmvfover&id="+id;xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){Ajaxdispfavor();}}
xmlHttp.open("GET",url,true);xmlHttp.send(null);}}function Ajaxdispfavor(){checkbrow();var url="stat.php";
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){document.getElementById('old').innerHTML=xmlHttp.responseText;}}
xmlHttp.open("GET",url,true);xmlHttp.send(null);}function Ajaxblkuser(id){var retn=confirm("Would you like to block this profile from future contact?");if(retn==true){checkbrow();var url="tributefun.php?act=blkusr&id="+id;
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){alert('This profile blocked successfully');}}
xmlHttp.open("GET",url,true);xmlHttp.send(null);}}function Ajaxblksch(id){var retn=confirm("Would you like to block this profile from future searches?");if(retn==true){checkbrow();var url="tributefun.php?act=blksch&id="+id;
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){alert('This profile blocked successfully');}}
xmlHttp.open("GET",url,true);xmlHttp.send(null);}}function Ajaxunblksch(id){var retn=confirm("Do you want to unblock this profile from future search?");if(retn==true){checkbrow();var url="tributefun.php?act=unblksch&id="+id;
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){alert('This profile unblocked successfully');}}
xmlHttp.open("GET",url,true);xmlHttp.send(null);}}function Ajaxunblkuser(id){var retn=confirm("Do you want to unblock this profile from future contact?");if(retn==true){checkbrow();var url="tributefun.php?act=unblkusr&id="+id;
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){alert('This profile unblocked successfully');}}
xmlHttp.open("GET",url,true);xmlHttp.send(null);}}function refreshspam(){checkbrow();var url="newspam.php";
xmlHttp.onreadystatechange=function(){getObj('newspam').innerHTML = "<img src='images/working.gif' align='middle'/>";if(xmlHttp.readyState==4){document.getElementById('newspam').innerHTML=xmlHttp.responseText;}}
xmlHttp.open("GET",url,true);xmlHttp.send(null);}function usrNmeExist(pid, frm, fname){if(pid==''){alert("Please enter username");return;}if(pid.length < 3|| pid.length >= 20){alert("User name must be specified range");return;}checkbrow();loadimage();var url="usercheck.php?id="+pid;
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){document.getElementById('chkavail').innerHTML=xmlHttp.responseText;}}
xmlHttp.open("GET",url,true);xmlHttp.send(null);function loadimage(){document.getElementById('chkavail').innerHTML = "<img src='images/working.gif' align='middle'  title='Loading data...'/>";document.getElementById('chkavail').style.display = "block";}}function checkbrow(){try{xmlHttp=new XMLHttpRequest()}catch(e){try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){alert("Your browser does not support AJAX!");return false}}}}function checkbrow1(){try{xmlHttpPost=new XMLHttpRequest()}catch(e){try{xmlHttpPost=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{xmlHttpPost=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){alert("Your browser does not support AJAX!");return false}}}}function checkbrow2(){try{xmlHttp1Post=new XMLHttpRequest()}catch(e){try{xmlHttp1Post=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{xmlHttp1Post=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){alert("Your browser does not support AJAX!");return false}}}}
<!--FLASHFun.JS file Script-->
var cpage;function fromwholikesme(id,cpage){cpage=cpage;var retn=confirm("Would you like to remove this profile from who like me?");if(retn==true){document.location.href="flashfun.php?act=likeme&id="+id+"&cpage="+cpage}}function fromfavourites(id,cpage){cpage=cpage;var retn=confirm("Would you like to remove this profile from your favourites?");if(retn==true){document.location.href="flashfun.php?act=favor&id="+id+"&cpage="+cpage}}function movetotopspot(id,cpage){cpage=cpage;var retn=confirm("Would you like to move this profile to your top spot?");if(retn==true){document.location.href="flashfun.php?act=topspot&id="+id+"&cpage="+cpage}}function fromlittleblackbook(id,cpage){alert(id);cpage=cpage;var retn=confirm("Would you like to remove this profile from your little block book?");if(retn==true){document.location.href="flashfun.php?act=little&id="+id+"&cpage="+cpage}}function removeprofile(id,cpage){var refpage=document.URL;cpage=cpage;var retn=confirm("Would you like to remove this profile from future searches?");if(retn==true){document.location.href="flashfun.php?act=remove&id="+id+"&cpage="+cpage+"&refpage="+escape(refpage)}}function unremove(id,cpage){cpage=cpage;var retn=confirm("Would you like to un-remove this profile from your removed list?");if(retn==true){document.location.href="flashfun.php?act=unremove&id="+id+"&cpage="+cpage}}function unblock(id,cpage){cpage=cpage;var retn=confirm("Would you like to un-block this profile from your blocked list?");if(retn==true){document.location.href="flashfun.php?act=unblock&id="+id+"&cpage="+cpage}}
<!--VALIDATE.JS file script-->
function doSubmit(){var mfrm=document.frmSignup;if(mfrm.txtusername.value==''){alert('Username is missing');mfrm.txtusername.focus();return false}else if(isNumeric(mfrm.txtusername.value.charAt(0))){alert('Username must start with alphabet');mfrm.txtusername.focus();return false}else if(mfrm.txtpassword.value==''){alert('Please input password');mfrm.txtpassword.focus();return false}else if(isNumeric(mfrm.txtpassword.value.charAt(0))){alert('Password must start with alphabet');mfrm.txtpassword.focus();return false}else if(mfrm.txtpassword2.value==''){alert('Please input confirm password');mfrm.txtpassword2.focus();return false}else if(isNumeric(mfrm.txtpassword2.value.charAt(0))){alert('Confirm Password must start with alphabet');mfrm.txtpassword2.focus();return false}else if(mfrm.txtpassword.value!=mfrm.txtpassword2.value){alert('Password and Confirm Password must be same');mfrm.txtpassword2.focus();return false}else if(mfrm.txtfirstname.value==''){alert('Please input first name');mfrm.txtfirstname.focus();return false}else if(isNumeric(mfrm.txtfirstname.value.charAt(0))){alert('First name must start with alphabet');mfrm.txtfirstname.focus();return false}else if(!isAlphabetic(mfrm.txtfirstname.value)){alert('First name should be alphabetic');mfrm.txtfirstname.focus();return false}else if(mfrm.txtlastname.value==''){alert('Please input last name');mfrm.txtlastname.focus();return false}else if(isNumeric(mfrm.txtlastname.value.charAt(0))){alert('Last name must start with alphabet');mfrm.txtlastname.focus();return false}else if(!isAlphabetic(mfrm.txtlastname.value)){alert('Last name should be alphabetic');mfrm.txtlastname.focus();return false}else if(mfrm.txtemail.value==''){alert('Please input email');mfrm.txtemail.focus();return false}else if(!isValidEmail(mfrm.txtemail.value)){alert('Please input valid email');mfrm.txtemail.focus();return false}else if(mfrm.txtcity.value==''){alert('Please input city');mfrm.txtcity.focus();return false}else if(isNumeric(mfrm.txtcity.value.charAt(0))){alert('City name must start with alphabet');mfrm.txtcity.focus();return false}else if(mfrm.txtstateprovince.value==''){alert('Please input state or province');mfrm.txtstateprovince.focus();return false}else if(mfrm.txtzip.value==''){alert('Please input zip code');mfrm.txtzip.focus();return false}else if(mfrm.txtaddress1.value==''){alert('Please input address line 1');mfrm.txtaddress1.focus();return false}else{return true}return false}
<!--CHECK.JS file script-->
var ErrorCount=0;var ErrorMsg=new Array();ErrorMsg[0]="------------------------- The Following Errors Occured -------------------------"+String.fromCharCode(10);function CheckFieldString(type,formField,strMsg){var checkOK;var checkStr=formField.value;var allValid=true;var flagDot=false;var namestr,domainstr;if(type=='noblank'){if(checkStr==""){ErrorCount++;ErrorMsg[ErrorCount]=strMsg+String.fromCharCode(10)}}else{if(type=='integer'){checkOK="0123456789"}else if(type=='decimal'){checkOK="0123456789."}else if(type=='text'){checkOK=text_chars}else if(type=='alphanumeric'){checkOK=alphanumeric_chars}else if(type=='full'){checkOK=full_chars}else if(type=='alphanum'){checkOK=alphanum_chars}else if(type=='email'){checkOK="0123456789_-@.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,7})+$/.test(checkStr)){}else{ErrorCount++;ErrorMsg[ErrorCount]=strMsg+String.fromCharCode(10)}}else if(type=='phone'){checkOK="0123456789-+"}else if(type=='URL'){checkOK="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.:/\\"}else if(type=='path'){checkOK="0123456789.+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz () \\ "}else{ErrorMsg[1]="Check Validation one of the mentioned validation type is wrong"+String.fromCharCode(10);ErrorCount++;return 1}for(i=0;i<checkStr.length;i++){ch=checkStr.charAt(i);for(j=0;j<checkOK.length;j++){if(ch==checkOK.charAt(j)){break}if(j==checkOK.length-1){allValid=false;break}}if(type=='decimal'){for(t=0;t<checkStr.length;t++){dot=checkStr.charAt(t);if(dot=='.'&&flagDot==false){flagDot=true}else if(dot=='.'&&flagDot==true){ErrorCount++;ErrorMsg[ErrorCount]=strMsg+String.fromCharCode(10);break}}}if(!allValid){ErrorCount++;ErrorMsg[ErrorCount]=strMsg+String.fromCharCode(10);break}}}}

