function registervalidation(){
    if(document.frmRegister.txtFname.value==''){
	alert('empty validation failed');
	return false;
    }else{
	alert('empty validation passed');
	return true;
    }
}

function previewWindow(windowName,url,windowH,windowW){  // show ane profile for edit
    var iMyWidth;
    var iMyHeight;
    //half the screen width minus half the new window width (plus 5 pixel borders).
    iMyWidth = (window.screen.width/2) - (windowW/2 + 10);
    //half the screen height minus half the new window height (plus title and status bars).
    iMyHeight = (window.screen.height/2) - (windowH/2 + 50);
    //url = "ane_edit_profile.php";
    newWindow=window.open(url,windowName,'height='+windowH+',width='+windowW+',top='+iMyHeight+',left='+iMyWidth+',toolbar=yes,resizeable=yes,location=1,status=yes,scrollbars=yes');
    newWindow.focus();
}

 function refreshAndClose(){
    window.close();
    if (window.opener && !window.opener.closed) {
	window.opener.location.reload();
    }
 }

 function refreshAndClose2(listid){
    window.close();
    if (window.opener && !window.opener.closed) {
	var origwindow=window.opener;
	origwindow.previewWindow('oneListing','member_payments_options.php?type=feature&id='+listid,650,1000);
	window.opener.location.reload();
    }
 }
