function ppcontentFun(x) {
	document.getElementById('ppcontent').style.visibility = "hidden";
if(x=='y'){ //pub
	document.getElementById("ppcontent").innerHTML="You have set your website for Public viewing. This means that anyone who know your URL can access and view your Matrimony Diary. Click 'Private' to set it for Private viewing by family and friends only.";
		document.getElementById("websitepasswordID2").innerHTML ="&nbsp;";
} else { //pri
		document.getElementById("ppcontent").innerHTML ="You have set your website for Private viewing. This means that only those people (Family and Friends) you have invited can view your Matrimony Diary using a password set by you.";
		document.getElementById("websitepasswordID2").innerHTML ="&nbsp;&nbsp;Set my Matrimony  Diary Password<font color=\"red\">*</font><input type=password  size=15 tabindex=11  style='font: normal 11px verdana,tahoma; border: 1px solid #000000;' NAME='viewerPassword' ID='viewerPassword' maxlength='15' >";
}
	document.getElementById('ppcontent').style.visibility = "visible";
}
	function validation()	{
		//user Name
		if(validate('signupFrm','userName','Please enter your username.','E') == false)
			return false;
		else
			if(validate('signupFrm','userName','s','AN') == false)
			return false;
		//password
		if(validate('signupFrm','passWord','Please enter your password.','E') == false)
			return false;
		else {
			//username & password
			if(document.signupFrm.userName.value == document.signupFrm.passWord.value) {
				alert("Username & Password should not be equal.");
				document.signupFrm.userName.focus();
				return false;
			}
			if(validate('signupFrm','passWord',5,'PL') == false)
				return false;
		}

		if(validate('signupFrm','cpassWord','Please confirm your password.','E') == false)
			return false;
		else
			if(validate('signupFrm','cpassWord',5,'PL') == false)
				return false;
		//confirm password
		if(document.signupFrm.passWord.value != document.signupFrm.cpassWord.value){
			alert("Both the passwords must match.");
			document.signupFrm.cpassWord.focus();
			return false;
		}
		// email
		if(validate('signupFrm','eMail','Please enter your e-mail ID.','E') == false){
			return false; 
		} else {
				if(validate('signupFrm','eMail','Please enter the E-Mail ID.','EM') == false) {
				return false; 
				}
		}
		//wedding Date
		var wDate = document.signupFrm.wedDate.value;
				if(wDate != "") {
					if(validateUSDate(wDate) == false) { 
						alert("Invalid Wedding Date. E.g:(dd-mm-yyyy)");
						return false;
					}
				}
		//Contry validation
		if (document.signupFrm.country.value == 0 || document.signupFrm.country.value == 999){
			alert("Please select the country living in");
			document.signupFrm.country.focus();
			return false;
		}
		
		//bride first Name
		if(validate('signupFrm','bfirstName','Please enter your name.','E') == false){
			return false;
		} else {
			if(validate('signupFrm','bfirstName','','A') == false)
			 return false;
		}
		//groom first Name
		var gname = document.getElementById("bNameID").innerHTML;
		gname = gname.replace('My','Your');
		var currentName = gname.substr(0,(gname.length-24));
		
		if(validate('signupFrm','gfirstName','Please enter '+ currentName +'.','E') == false){
			return false;
		} else {
			if(validate('signupFrm','gfirstName','','A') == false)
			 return false;
		}
		//website pword
		var pword = (document.getElementById("websitepasswordID2").innerHTML).length;
		if(pword > 10) {
				if(document.getElementById("viewerPassword").value == "") {
					alert("Please enter Matrimony Diary Password.");
					document.getElementById("viewerPassword").focus();
					return false;
				} else {
					var vplength = document.getElementById("viewerPassword").value;
					var vplen = vplength.length;
					if(vplen <5) {
						alert("You should enter atleast 5 characters.");
						document.getElementById("viewerPassword").focus();
						return false;
					}
				}
				document.signupFrm.viewerPassword_hi.value= document.getElementById("viewerPassword").value;
		}
			//public privi
		var passCount =0;
		for(var ik = 0; ik<2 ;ik++) {
			if( document.signupFrm.passswordProtection[ik].checked == true) {
				var passCount = 1;
			} 
		}
		if(passCount != 1){
			alert("Please set your website viewing.");
			return false;
		}	
	document.signupFrm.Register_hi.value="Continue"; 
}
function visibleID(gender) {
	if ( document.signupFrm.wedDate.value !="") {
		var formatedWdate,Wdate,fname;
		var today=new Date();
		Wdate = document.signupFrm.wedDate.value;
		formatedWdate = Wdate.split("-",3);
		WeddingDate = new Date(formatedWdate[2],(formatedWdate[1] -  1),formatedWdate[0]);
		WeddingcDate = WeddingDate.getTime();
		todayDate = today.getTime(); 
		if ( WeddingcDate > todayDate ) {
					if(gender == "G")
						fname = "My fianc&eacute;e's name<font color='red'>*</font>";	
					else 
						fname = "My fianc&eacute;'s name<font color='red'>*</font>";	
		} else {
					if(gender == "G")
						fname = "My wife's name<font color='red'>*</font>";	
					else 
						fname = "My husband's name<font color='red'>*</font>";	
		}
	} else {
					if(gender == "G")
						fname = "My fianc&eacute;e's name<font color='red'>*</font>";	
					else 
						fname = "My fianc&eacute;'s name<font color='red'>*</font>";	
	}
	document.getElementById("bNameID").innerHTML = fname;
	return false;
}
function visibleIDnew() {
	for (var i=0; i < document.signupFrm.gender.length; i++)   {
	   if (document.signupFrm.gender[i].checked)  {
	      var rad_val = document.signupFrm.gender[i].value;
      }
   }
	visibleID(rad_val);
}
