
function validatePostProfile()
{
	var validInput = true;
	obj_username = document.getElementById('email');
	obj_password = document.getElementById('pass');
	
	un = obj_username.value;
	pw = obj_password.value;
	
	if(document.getElementById("emailplace").style.display != "none" && document.getElementById("passPlace").style.display != "none")
	{
		alert('Please enter your Username and Password');
		return false;
	}

	if(document.getElementById("emailplace").style.display == "none")
	{
		
	if (trim(un) == "")
	{
		 alert('Please enter your Username');
		 obj_username.value = "";
		 obj_username.focus();
		 return false;
	 }
	 }
	 else
	 {
		 alert('Please enter your Username');
		 return false;
	 }
	
	 if(document.getElementById("passPlace").style.display == "none")
	 {
	 if (trim(pw) == "")
	 {
		 alert('Please enter your Password');
		 obj_password.value = "";
		 obj_password.focus();
		 return false;
	 }
	 }
	 else
	 {
		 alert('Please enter your Password');
		 return false;
	 }
	 
 return true;
 
 }

 function SwapPassword1()
 {	
 	///alert('SwapPassword');
	 document.getElementById("passPlace").style.display = "none";
	 document.getElementById("pass").style.display = "";
	 document.getElementById("pass").focus();
	 //document.forms["headerForm"]["Password"].focus();
 }

 function SwapUsername1()
 {
	 ///alert('SwapUsername');
	 document.getElementById("emailplace").style.display = "none";
	 document.getElementById("email").style.display = "";
	 document.getElementById("email").focus();
	 //document.forms["headerForm"]["Username"].focus();
 }

 function SwapUsernamePlace1()
 {
	 ///alert('SwapUsernamePlace');
	 
	 if (document.getElementById("email").value == '')
	 {
		 document.getElementById("emailplace").style.display = "";
		 document.getElementById("email").style.display = "none";
	 }
 }

 function SwapPasswordPlace1()
 {
	// alert('SwapPasswordPlace');
	if (document.getElementById("pass").value == '')
	 {
		 document.getElementById("passPlace").style.display = "";
		 document.getElementById("pass").style.display = "none";
	 }
 }

