﻿var alreadyClicked = 0;
function checkValidDateOfBirth(txtDDElement,txtMMElement,txtYYElement,ErrorCode,allowEmpty){
	if(allowEmpty == false)
	{
	    if (txtDDElement.selectedIndex==0)
	    {
		    alert(ErrorCode)
		    txtDDElement.focus()
		    return false
	    }
	    if (txtMMElement.selectedIndex==0)
	    {
		    alert(ErrorCode)
		    txtMMElement.focus()
		    return false
	    }
	    if (txtYYElement.selectedIndex==0)
	    {
		    alert(ErrorCode)
		    txtYYElement.focus()
		    return false
	    }
	}	
	var userDay=txtDDElement[txtDDElement.selectedIndex].value
	var userMon=txtMMElement[txtMMElement.selectedIndex].value
	var userYear=txtYYElement[txtYYElement.selectedIndex].value
	var passedDate=new Date(userYear,userMon-1,userDay)
	var todays=new Date()
	var currdate= new Date(todays.getFullYear()-2,todays.getMonth(),todays.getDate())	
	if(passedDate>currdate)
	{
	   alert('Age should be more than 2 years');
	   txtDDElement.focus();
	   return false;
	}
	if(parseFloat(passedDate.getDate())!=parseFloat(userDay) || parseFloat(passedDate.getMonth())!=parseFloat(userMon-1) || parseFloat(passedDate.getFullYear())!=parseFloat(userYear))
	{
	    alert(ErrorCode);
	    txtDDElement.focus();
	    return false;
	}
	return true;
	}

function chkLength(txtElement,MinPwdLength,errorMessage)
{
	if (txtElement.value.length < MinPwdLength)
		{
		alert(errorMessage);
		txtElement.focus();
		return false;
		}
		return true;
}
//Validates dropdown select box.
function chkDDList(lstElement,ErrorCode)
{
	if (lstElement.selectedIndex==0)
	{
		alert( ErrorCode )
		lstElement.focus()
		return false;
	}
	else
	{
		return true;
	}
}

//Validate a TextBox Input
function checkTextBox(txtElement,ErrorCode)
{
	str = trim(txtElement.value);
	if(str.length == 0)
	{
		alert(ErrorCode);
	    txtElement.focus();
		return false;
	}
	return true;
}
//Validate a TextBox Input with Arabic Content added by Sugeet on 22 Nov,2006
// Special characters are -,.'
function checkTextBoxArabic(txtElement,ErrorCode)
{
	str = trim(txtElement.value);
	if(str.search("[^0-9A-Za-z-,.' ]")!=-1)
	{
		alert(ErrorCode);
		txtElement.value = "";
	    txtElement.focus();
		return false;
	}
	return true;
}

//Validate a TextBox Input Address field with Arabic Content added by Saurabh on 10 Jan,2007
// Special characters are -,.'
function checkTextBoxArabicAddress(txtElement,ErrorCode)
{
	str = trim(txtElement.value);
	if(str.search("[^0-9A-Za-z-,.'\\\\/ ]")!=-1)
	{
		alert(ErrorCode);
		txtElement.value = "";
	    txtElement.focus();
		return false;
	}
	return true;
}
//Validates Email. NS 4+ or IE 4+
function checkEmail(txtElement,fieldName,allowEmpty)
{
	var str= txtElement.value;
	str=trim(str);
	
	if((allowEmpty == false) && (str.length == 0))//empty value is not allowed
	{
		alert(fieldName);
		txtElement.focus();
		return false;
	}
	if(allowEmpty == true && str.length == 0)//empty value is allowed
	{
		return true;
	}
	else 
	{
		   if (str.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
             {
			     testresults=true;
			 }
		    else
	
		{
			alert(fieldName);
			txtElement.focus();
			testresults=false;
		}
	}	
	return (testresults);
}
//Validates Pin/Phone/Fax
function chkPinPhoneFax(txtElement,fieldName,allowEmpty)
{
    str = trim(txtElement.value);
	if(allowEmpty==false && str.length == 0)
	{
		alert(fieldName);
		txtElement.focus();
		return false;
	}
	if(str.search("[^0-9]")!=-1)
	{
		alert(fieldName);
		txtElement.value = "";
		txtElement.focus();
		return false;
	}
			
	return true;
}

function chkPinPhoneFaxNew(txtElementISD,txtElementSTD,txtElement,ErrorCode1,ErrorCode2,ErrorCode3,ErrorCode4,ErrorCode5,ErrorCode6)
{
    
	if(trim(txtElementISD.value) == "" && trim(txtElementSTD.value) != "" && trim(txtElement.value) != "")
	{
		alert(ErrorCode1);
		txtElementISD.focus();
		return false;
	}
	if(trim(txtElementISD.value) != "" && trim(txtElementSTD.value) != "" && trim(txtElement.value) == "")
	{
		alert(ErrorCode2);
		txtElement.focus();
		return false;
	}
	if(trim(txtElementISD.value) == "" && trim(txtElementSTD.value) != "" && trim(txtElement.value) == "")
	{
		alert(ErrorCode3);
		txtElementISD.focus();
		return false;
	}
		if(trim(txtElementISD.value) != "" && trim(txtElementSTD.value) == "" && trim(txtElement.value) != "")
	{
		alert(ErrorCode4);
		txtElementSTD.focus();
		return false;
	}
	if(trim(txtElementISD.value) != "" && trim(txtElementSTD.value) == "" && trim(txtElement.value) == "")
	{
		alert(ErrorCode5);
		txtElementSTD.focus();
		return false;
	}
	if(trim(txtElementISD.value) == "" && trim(txtElementSTD.value) == "" && trim(txtElement.value) != "")
	{
		alert(ErrorCode6);
		txtElementISD.focus();
		return false;
	}
			
	return true;
}
//function to check special characters like @#$%^&*()+ except _ , -and . in the string for fields like User ID
function chkSpecialCharUserId(txtElement)
{
	if(txtElement.value.search("[^0-9a-z,.@-_&/\A-Z -]")!=-1) 
	{
		return false;
	}
	return true;
}

//Left Trim a string
function ltrim(strText) 
{
	return strText.replace(/^\s+/,'');
}
//Right trim a string
function rtrim(strText) 
{
	return strText.replace(/\s+$/,'');
}
//Trim a string

function trim(strText) 
{	
	return strText.replace(/^\s+/,'').replace(/\s+$/,'');
}
function chkPassword(txtElement,ErrorCode,allowEmpty)
{
    str = trim(txtElement.value);
	if(allowEmpty==false && str.length == 0)
	{
		alert(ErrorCode);
		txtElement.value = "";
		txtElement.focus();
		return false;
	}
	return true;
}
		// FUNCTION FOR POPUP WINDOW
var strWin=null;
function OpenWin(strURL,winWidth,winHeight) 
{
	var chngpass;
	strWinName='EtihadPopup'
	winTop=0; 
	winLeft=0;
	winLeft=Math.floor((Math.abs(screen.availWidth-winWidth))/2);
	winTop= Math.floor((Math.abs(screen.availHeight-winHeight))/2);
	try{
	if(strWin!=null)
	{
		strWin.close();
	}
	}catch (e){};
	strWin=window.open(strURL,strWinName,'top= '+ winTop + ',left=' + winLeft + ',width=' + winWidth + ',height= '+winHeight+',toolbar=nomenubar=no,location=no,directories=no,status=no,resizable=yes,scrollbars=yes,scrollbar=yes');
	strWin.focus();
}
//saurabh... to check the state value
function chkStateValue(txtElement,fieldNameValidName)
	{
	    str = trim(txtElement.value);    

        if((!(str.search("[^1-9]")!=-1)) && str.length > 0)
		{		
			alert(fieldNameValidName);
			txtElement.value = "" ;
			txtElement.focus();
			return false;
		}
		return true;
	}	
	//Added on 29th Oct
	function chkNamePassport(txtElement,fieldNameEmpty,fieldNameSingleChar,fieldNameValidName,allowEmpty)
	{
	    str = trim(txtElement.value);
	    
		if(allowEmpty==false && str.length == 0)
		{
			alert(fieldNameEmpty);
			txtElement.focus();
			return false;
		}
		if(str.length == 1)
		{
			alert(fieldNameSingleChar);
			txtElement.focus();
			return false;
		}
		if(str.search("[^a-zA-Z ]")!=-1)
		{		
			alert(fieldNameValidName);
			txtElement.value = "" ;
			txtElement.focus();
			return false;
		}
		return true;
	}
	// Modified by sugeet on 1 nov,2006 
		function checkGenderMapping(rbdGender0,rbdGender1,ddlTitleElement,fieldNameValidName)
	{
	
	    str = ddlTitleElement.options[ddlTitleElement.selectedIndex].value;
	    var selectedLanguageEnglish = document.getElementById(contentPlaceholder+'_rdbListPreferredLanguage_1');
	    var selectedLanguageArabic = document.getElementById(contentPlaceholder+'_rdbListPreferredLanguage_0');
	   if(selectedLanguageEnglish.checked)
	   {
		    if(rbdGender0.checked)
		    {
		      for (iscount = 0 ; iscount < title.length ; iscount ++  )
		       {
    		    	       		    
		              if(title[iscount][1] == "F" && title[iscount][0] == str)
		                {
		                    alert(fieldNameValidName);
		            	    ddlTitleElement.focus();
			                return false;
		                }
		       }	   
		    }
		else if(rbdGender1.checked)
		    {		
		        for (iscount = 0 ; iscount < title.length ; iscount ++  )
		           {        		     	        
		                    if(title[iscount][1] == "M" && title[iscount][0] == str)
		                    {
		                        alert(fieldNameValidName);
		            	        ddlTitleElement.focus();
			                    return false;
		                    }
		           }	   		
		    }   
		} 
		else if(selectedLanguageArabic.checked)
		{		
		     if(rbdGender0.checked)
		    {
		      for (iscount = 0 ; iscount < titleArabic.length ; iscount ++  )
		       {    		    	       		    
		              if(titleArabic[iscount][1] == "F" && titleArabic[iscount][0] == str)
		                {
		                    alert(fieldNameValidName);
		            	    ddlTitleElement.focus();
			                return false;
		                }
		       }	   
		    }
		else if(rbdGender1.checked)
		    {		
		        for (iscount = 0 ; iscount < titleArabic.length ; iscount ++  )
		           {        		     	        
		                    if(titleArabic[iscount][1] == "M" && titleArabic[iscount][0] == str)
		                    {
		                        alert(fieldNameValidName);
		            	        ddlTitleElement.focus();
			                    return false;
		                    }
		           }	   		
		    } 
		}   
		return true;
	}
// Declartion of global variable to show-hide next and previous div 	
var jsindex = 1 ;	
function ShowHideDivPrevious()
{
   if(document.getElementById(contentPlaceholder+'_divErrorMsg')!=null)
  {
	  document.getElementById(contentPlaceholder+'_divErrorMsg').style.display = 'none';
  }
/******************************************************************************
/Purpose:	It is called on click of Previous Link Button 
/Inputs:	void
/Returns:	false to avoid form postback
/*****************************************************************************/
    // Set display of all divs as none   
     document.getElementById(divRegistrationPersonalDetails).style.display = 'none';
     document.getElementById(divRegistrationContactDetails).style.display = 'none';
     document.getElementById(divRegistrationPreferences).style.display = 'none';
     document.getElementById(divRegistrationReviewDetails).style.display = 'none';
     document.getElementById(divValidateContactDetails).style.display = 'none'; 
     document.getElementById(divValidateReviewDetails).style.display = 'none'; 
     document.getElementById(divValidatePersonalDetails).style.display = 'none'; 
     document.getElementById(divValidatePreferences).style.display = 'none'; 
     
 // Show hide according to the div status defined by index
 if(jsindex==4)
	{
	// Display the required divs
	document.getElementById(divValidatePreferences).style.display = ''; 
	document.getElementById(divRegistrationPreferences).style.display = '';
	
     //contact details placeholder
     // Headers
    if (document.getElementById(contentPlaceholder+'_ContentPlaceholderHeader__ControlWrapper_RichHtmlField') != null)
    {
        document.getElementById(contentPlaceholder+'_ContentPlaceholderHeader__ControlWrapper_RichHtmlField').style.display = 'none';
    }
    else if (document.getElementById(contentPlaceholder+'_CUGContentPlaceholderHeader__ControlWrapper_RichHtmlField') != null)
    {
        document.getElementById(contentPlaceholder+'_CUGContentPlaceholderHeader__ControlWrapper_RichHtmlField').style.display = 'none';
    }
    document.getElementById(contentPlaceholder+'_ContentPlaceholderHeaderContactDtls__ControlWrapper_RichHtmlField').style.display = 'none';
   document.getElementById(contentPlaceholder+'_ContentPlaceholderHeaderPreferences__ControlWrapper_RichHtmlField').style.display = '';
   document.getElementById(contentPlaceholder+'_ContentPlaceholderHeaderRvwDtls__ControlWrapper_RichHtmlField').style.display = 'none';
	
	// Footers
    if (document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterHeading__ControlWrapper_RichHtmlField') != null)
    {
        document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterHeading__ControlWrapper_RichHtmlField').style.display = 'none';
    }
    else if (document.getElementById(contentPlaceholder+'_CUGContentPlaceholderFooter__ControlWrapper_RichHtmlField') != null)
    {
        document.getElementById(contentPlaceholder+'_CUGContentPlaceholderFooter__ControlWrapper_RichHtmlField').style.display = 'none';
    }
    document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterContactDtls__ControlWrapper_RichHtmlField').style.display = 'none';
  document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterPreferences__ControlWrapper_RichHtmlField').style.display = '';
  document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterRvwDtls__ControlWrapper_RichHtmlField').style.display = 'none';

	clearInterestFields();
	clearPreferenceFields();
	// Set the index from current status to next status
    jsindex = 3;
	}	
 else if(jsindex==3)
	{
	// Display the required divs
	document.getElementById(divRegistrationContactDetails).style.display = '';
	document.getElementById(divValidateContactDetails).style.display = ''; 
     //contact details placeholder
     // Headers
    document.getElementById(contentPlaceholder+'_ContentPlaceholderHeaderContactDtls__ControlWrapper_RichHtmlField').style.display = '';
    if (document.getElementById(contentPlaceholder+'_ContentPlaceholderHeader__ControlWrapper_RichHtmlField') != null)
    {
        document.getElementById(contentPlaceholder+'_ContentPlaceholderHeader__ControlWrapper_RichHtmlField').style.display = 'none';
    }
    else if (document.getElementById(contentPlaceholder+'_CUGContentPlaceholderHeader__ControlWrapper_RichHtmlField') != null)
    {
        document.getElementById(contentPlaceholder+'_CUGContentPlaceholderHeader__ControlWrapper_RichHtmlField').style.display = 'none';
    }
     document.getElementById(contentPlaceholder+'_ContentPlaceholderHeaderPreferences__ControlWrapper_RichHtmlField').style.display = 'none';
    document.getElementById(contentPlaceholder+'_ContentPlaceholderHeaderRvwDtls__ControlWrapper_RichHtmlField').style.display = 'none';

	// Footers
    if (document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterHeading__ControlWrapper_RichHtmlField') != null)
    {
        document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterHeading__ControlWrapper_RichHtmlField').style.display = 'none';
    }
    else if (document.getElementById(contentPlaceholder+'_CUGContentPlaceholderFooter__ControlWrapper_RichHtmlField') != null)
    {
        document.getElementById(contentPlaceholder+'_CUGContentPlaceholderFooter__ControlWrapper_RichHtmlField').style.display = 'none';
    }
    document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterContactDtls__ControlWrapper_RichHtmlField').style.display = '';
    document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterPreferences__ControlWrapper_RichHtmlField').style.display = 'none';
    document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterRvwDtls__ControlWrapper_RichHtmlField').style.display = 'none';
	
	// Set the index from current status to next status
	jsindex = 2;
	}
else if(jsindex==2)
	{
	// Display the required divs
	document.getElementById(divRegistrationPersonalDetails).style.display = '';
	document.getElementById(divValidatePersonalDetails).style.display = ''; 
	document.getElementById('divLoginForRegistrationForm').style.display = ''; 
     //contact details placeholder
     // Headers
    if (document.getElementById(contentPlaceholder+'_ContentPlaceholderHeader__ControlWrapper_RichHtmlField') != null)
    {
        document.getElementById(contentPlaceholder+'_ContentPlaceholderHeader__ControlWrapper_RichHtmlField').style.display = '';
    }
    else if (document.getElementById(contentPlaceholder+'_CUGContentPlaceholderHeader__ControlWrapper_RichHtmlField') != null)
    {
        document.getElementById(contentPlaceholder+'_CUGContentPlaceholderHeader__ControlWrapper_RichHtmlField').style.display = '';
    }
   document.getElementById(contentPlaceholder+'_ContentPlaceholderHeaderContactDtls__ControlWrapper_RichHtmlField').style.display = 'none';
   document.getElementById(contentPlaceholder+'_ContentPlaceholderHeaderPreferences__ControlWrapper_RichHtmlField').style.display = 'none';
   document.getElementById(contentPlaceholder+'_ContentPlaceholderHeaderRvwDtls__ControlWrapper_RichHtmlField').style.display = 'none';

	// Footers
    if (document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterHeading__ControlWrapper_RichHtmlField') != null)
    {
        document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterHeading__ControlWrapper_RichHtmlField').style.display = '';
    }
    else if (document.getElementById(contentPlaceholder+'_CUGContentPlaceholderFooter__ControlWrapper_RichHtmlField') != null)
    {
        document.getElementById(contentPlaceholder+'_CUGContentPlaceholderFooter__ControlWrapper_RichHtmlField').style.display = '';
    }
    document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterContactDtls__ControlWrapper_RichHtmlField').style.display = 'none';
    document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterPreferences__ControlWrapper_RichHtmlField').style.display = 'none';
    document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterRvwDtls__ControlWrapper_RichHtmlField').style.display = 'none';

	// Set the index from current status to next status
	jsindex = 1;
	}
   // Return false so that the form is not posted back
	return false;	
}	
function ShowHideDivNext()
{
/******************************************************************************
/Purpose:  It is called on click of Next Link Button 
/Inputs  void
/Returns:  boolean to decide if the form is posted back
/*****************************************************************************/

  // Show hide according to the div status defined by index
    if(document.getElementById(contentPlaceholder+'_divErrorMsg')!=null)
  {
	  document.getElementById(contentPlaceholder+'_divErrorMsg').style.display = 'none';
  }
 if(jsindex==1)
	{
	
	        // display Login in first page	
        document.getElementById('divLoginForRegistrationForm').style.display = '';
	  if(document.getElementById(contentPlaceholder+'_lblError')!=null)
        {
	        document.getElementById(contentPlaceholder+'_lblError').style.visibility="hidden";
        } 	

         var a =document.getElementById(contentPlaceholder+'_txtConfirmPassword');
         var b = document.getElementById(contentPlaceholder+'_txtPassword');
         
         // First check for all validations in first div
         if(!chkDDList( document.getElementById(contentPlaceholder+'_ddlSalutation'),RegisterPersonal_ERR1))
           {    
                // Donot move to next div if validation is unsuccessfull
                 return false;
           }
         // Check whether Title is selected
         if(update != 1)
         {                   
                   if(!chkNamePassport(document.getElementById(contentPlaceholder+'_txtFirstNamePp'),RegisterPersonal_ERR2,RegisterPersonal_Err20,RegisterPersonal_Err17,false))
                    {
                        // Donot move to next div if validation is unsuccessfull
                          return false;
                    }
                    // Check whether LastName in Passport is given
                   else if(!chkNamePassport(document.getElementById(contentPlaceholder+'_txtLastNamePp'),RegisterPersonal_ERR3,RegisterPersonal_Err21,RegisterPersonal_Err18,false))
                    {
                        // Donot move to next div if validation is unsuccessfull
                         return false;
                    }
                    
                    else if(document.getElementById(contentPlaceholder+'_rdbListPreferredLanguage_0').checked == true)
                    {
                        if(!checkTextBox(document.getElementById(contentPlaceholder+'_txtFirstNameArabic'),RegisterPersonal_ERR4))
                        {
                            return false ;
                        }
                        else if(!checkTextBox(document.getElementById(contentPlaceholder+'_txtLastNameArabic'),RegisterPersonal_ERR5))
                        {
                            return false ;
                        }
                    }
                   //Added on 29th Oct and modified by Sugeet on 1 Nov,2006
                if(!checkGenderMapping(document.getElementById(contentPlaceholder+'_rdbListGender_0'),document.getElementById(contentPlaceholder+'_rdbListGender_1'),document.getElementById(contentPlaceholder+'_ddlSalutation'),RegisterPersonal_Err22))
                   { 
                        // Donot move to next div if validation is unsuccessfull
	                    return false;
	               }
          } 
          
            // Added by sugeet on 22 Nov, 2006
          if(!checkTextBoxArabic(document.getElementById(contentPlaceholder+'_txtPpNo'),RegisterPersonal_Err23))
          {
            return false;
          }  
            // Check whether is given and is valid
           if(update == 0)
           {
               // Check whether Date of birth is entered and is valid
               if(!checkValidDateOfBirth(document.getElementById(contentPlaceholder+'_ddbDate'),document.getElementById(contentPlaceholder+'_ddbMonth'),document.getElementById(contentPlaceholder+'_ddbYear'),RegisterPersonal_ERR6,false))
                {
	                // Donot move to next div if validation is unsuccessfull
	                return false;
                }
              
                if(!chkSpecialCharUserId(document.getElementById(contentPlaceholder+'_txtUserId')))
                {
	                alert(RegisterPersonal_ERR8);
	                document.getElementById(contentPlaceholder+'_txtUserId').focus();
	              // Donot move to next div if validation is unsuccessfull
	                return false;
                }
                else if(!chkPassword(document.getElementById(contentPlaceholder+'_txtPassword'),RegisterPersonal_ERR9,false))
                {                  
	                return false;
	            }
	            else if(!chkLength(document.getElementById(contentPlaceholder+'_txtPassword'),6,RegisterPersonal_Err19))    
	            {
	                return false
	            }
	            else if(!checkTextBoxArabic(document.getElementById(contentPlaceholder+'_txtPassword'),RegisterPersonal_Err23))
                {
                    return false;
                }   
	            // Check whether Confirm password is given
                else if(!chkPassword(document.getElementById(contentPlaceholder+'_txtConfirmPassword'),RegisterPersonal_ERR10,false))
                {	            
	                return false;
                }
                // Check whether Confirm password matches the Password
                else if (a.value != b.value)
                {	                
	                alert(RegisterPersonal_Err13); 
	                document.getElementById(contentPlaceholder+'_txtConfirmPassword').focus();	             
	                return false;
                }
            }
            // Set display of all divs as none
            document.getElementById(divRegistrationPersonalDetails).style.display = 'none';
            document.getElementById(divRegistrationContactDetails).style.display = 'none';
            document.getElementById(divRegistrationPreferences).style.display = 'none';
            document.getElementById(divRegistrationReviewDetails).style.display = 'none';
            document.getElementById(divValidateContactDetails).style.display = 'none'; 
            document.getElementById(divValidateReviewDetails).style.display = 'none'; 
            document.getElementById(divValidatePersonalDetails).style.display = 'none'; 
            document.getElementById(divValidatePreferences).style.display = 'none'; 
           // If radiobutton home is checked 
           if(document.getElementById(contentPlaceholder+'_rdbListAddressType_0').checked )
	        {
	           // Disable Company Name , Job Title, Department
	           document.getElementById(contentPlaceholder+'_txtCompanyName').disabled = true ;
	           document.getElementById(contentPlaceholder+'_txtJobTitle').disabled = true ;
	           document.getElementById(contentPlaceholder+'_txtDepartment').disabled = true ;
            }
            // Display the required divs 
            document.getElementById(divValidateContactDetails).style.display = ''; 
	        document.getElementById(divRegistrationContactDetails).style.display = '';
	        // Contact details placeholder
	        // Headers 
	        if (document.getElementById(contentPlaceholder+'_ContentPlaceholderHeader__ControlWrapper_RichHtmlField') != null)
	        {
	            document.getElementById(contentPlaceholder+'_ContentPlaceholderHeader__ControlWrapper_RichHtmlField').style.display = 'none';
	        }
	        else if (document.getElementById(contentPlaceholder+'_CUGContentPlaceholderHeader__ControlWrapper_RichHtmlField') != null)
	        {
	            document.getElementById(contentPlaceholder+'_CUGContentPlaceholderHeader__ControlWrapper_RichHtmlField').style.display = 'none';
	        }
           document.getElementById(contentPlaceholder+'_ContentPlaceholderHeaderContactDtls__ControlWrapper_RichHtmlField').style.display = '';
           document.getElementById(contentPlaceholder+'_ContentPlaceholderHeaderPreferences__ControlWrapper_RichHtmlField').style.display = 'none';
           document.getElementById(contentPlaceholder+'_ContentPlaceholderHeaderRvwDtls__ControlWrapper_RichHtmlField').style.display = 'none';
            	        
	        // Footers
            if (document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterHeading__ControlWrapper_RichHtmlField') != null)
            {
                document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterHeading__ControlWrapper_RichHtmlField').style.display = 'none';
            }
            else if (document.getElementById(contentPlaceholder+'_CUGContentPlaceholderFooter__ControlWrapper_RichHtmlField') != null)
            {
                document.getElementById(contentPlaceholder+'_CUGContentPlaceholderFooter__ControlWrapper_RichHtmlField').style.display = 'none';
            }
           document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterContactDtls__ControlWrapper_RichHtmlField').style.display = '';
           document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterPreferences__ControlWrapper_RichHtmlField').style.display = 'none';
           document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterRvwDtls__ControlWrapper_RichHtmlField').style.display = 'none';        	
	       document.getElementById(contentPlaceholder+'_rdbListAddressType_0').focus();
        	
	        // Set the index from current status to next status
	        jsindex = 2;
          document.getElementById('divLoginForRegistrationForm').style.display = 'none'; 
 }
 else if(jsindex==2)
  {
          // First check for all validations in second div
	         // If Radiobutton Business is checked
             if(document.getElementById(contentPlaceholder+'_rdbListAddressType_1').checked )
    	        {
	                // Check whether company name is given 
	                if( !checkTextBox(document.getElementById(contentPlaceholder+'_txtCompanyName'),ContactDetails_Err5))
	                  {
	                     // Donot move to next div if validation is unsuccessfull
	                     return false;
	                  }
	                else if(!checkTextBoxArabic(document.getElementById(contentPlaceholder+'_txtCompanyName'),RegisterPersonal_Err23))
                      {
                        return false;
                      }  
                    else if(!checkTextBoxArabic(document.getElementById(contentPlaceholder+'_txtJobTitle'),RegisterPersonal_Err23))
                      {
                        return false;
                      }       
	                   // Check whether Job Title is given   
	                else if(!checkTextBox(document.getElementById(contentPlaceholder+'_txtDepartment'),ContactDetails_Err6))
	                  {	                   
	                     return false;
	                  }
	                 else if(!checkTextBoxArabic(document.getElementById(contentPlaceholder+'_txtDepartment'),RegisterPersonal_Err23))
                      {
                        return false;
                      }  
	            } 
	        if(!chkPinPhoneFax(document.getElementById(contentPlaceholder+'_txtPoBoxNo'),ContactDetails_Err24,true))
              {   
              		 // Donot move to next div if validation is unsuccessfull          
                    return false;                
              }  
	           // Check whether Address Line one is given 
	          else if(!checkTextBox(document.getElementById(contentPlaceholder+'_txtAddressLine1'),ContactDetails_Err1))
	             {	                
	                 return false;
	             }       
	          else if(!checkTextBoxArabicAddress(document.getElementById(contentPlaceholder+'_txtAddressLine1'),RegisterPersonal_Err26))
                      {
                        return false;
                      }
               else if(!checkTextBoxArabicAddress(document.getElementById(contentPlaceholder+'_txtAddressLine2'),RegisterPersonal_Err26))
                      {
                        return false;
                      } 
        // end saurabh
               else if(!checkTextBoxArabic(document.getElementById(contentPlaceholder+'_txtPostalCode'),RegisterPersonal_Err23))
                      {
                        return false;
                      }                     
	             // Check whether City is Selected    
	          else if(!checkTextBox(document.getElementById(contentPlaceholder+'_txtCity'),ContactDetails_Err3))
                 {                   
                    return false;
                 }
               else if(!checkTextBoxArabic(document.getElementById(contentPlaceholder+'_txtCity'),RegisterPersonal_Err23))
                      {
                        return false;
                      } 
               else if(!checkTextBoxArabic(document.getElementById(contentPlaceholder+'_txtState'),RegisterPersonal_Err23))
                      {
                        return false;
                      }          
                //saurabh txtState
                else if (!chkStateValue(document.getElementById(contentPlaceholder+'_txtState'),RegisterPersonal_Err25))
                {
                // Donot move to next div if validation is unsuccessfull
	                return false;
                }  
                  // Check whether Country is Selected 
                 else if(!chkDDList(document.getElementById(contentPlaceholder+'_ddlCountry'),ContactDetails_Err2))
                 {                  
                    return false;
                 }  
                  // Check for the validity of the numbers in telephone textfield  
              else if(!chkPinPhoneFax(document.getElementById(contentPlaceholder+'_txtTelephoneNoHomeISD'),ContactDetails_Err8,true))
              {              
                    return false;
              }  
               // Check for the validity of the numbers in telephone textfield  
              else if(!chkPinPhoneFax(document.getElementById(contentPlaceholder+'_txtTelephoneNoHomeSTD'),ContactDetails_Err8,true))
              {
                    return false;
              }    
               // Check for the validity of the numbers in telephone textfield  
              else if(!chkPinPhoneFax(document.getElementById(contentPlaceholder+'_txtTelephoneNoHome'),ContactDetails_Err8,true))
              {             
                    return false;
              }      
               // Check for the validity of the numbers in telephone textfield  
              else if(!chkPinPhoneFax(document.getElementById(contentPlaceholder+'_txtTelephoneNoBusinessISD'),ContactDetails_Err9,true))
              {             
                    return false;
              }   
               // Check for the validity of the numbers in telephone textfield  
              else if(!chkPinPhoneFax(document.getElementById(contentPlaceholder+'_txtTelephoneNoBusinessSTD'),ContactDetails_Err9,true))
              {            
                    return false;
              }  
               // Check for the validity of the numbers in telephone textfield  
              else if(!chkPinPhoneFax(document.getElementById(contentPlaceholder+'_txtTelephoneNoBusiness'),ContactDetails_Err9,true))
              {             
                    return false;
              }  
               // Check for the validity of the numbers in telephone textfield  
              else if(!chkPinPhoneFax(document.getElementById(contentPlaceholder+'_txtFaxNoISD'),ContactDetails_Err10,true)) 
              {             
                    return false;
              }   
                // Check for the validity of the numbers in telephone textfield  
              else if(!chkPinPhoneFax(document.getElementById(contentPlaceholder+'_txtFaxNoSTD'),ContactDetails_Err10,true))
              {             
                    return false;
              }   
                // Check for the validity of the numbers in telephone textfield  
              else if(!chkPinPhoneFax(document.getElementById(contentPlaceholder+'_txtFaxNo'),ContactDetails_Err10,true))
              {            
                    return false;
              }   
               // Check for the validity of the numbers in telephone textfield  
              else if(!chkPinPhoneFax(document.getElementById(contentPlaceholder+'_txtMobileNoISD'),ContactDetails_Err11,true))
              {             
                    return false;
              }  
               // Check for the validity of the numbers in telephone textfield  
              else if(!chkPinPhoneFax(document.getElementById(contentPlaceholder+'_txtMobileNoSTD'),ContactDetails_Err11,true))
              {           
                    return false;
              }   
               // Check for the validity of the numbers in telephone textfield  
              else if(!chkPinPhoneFax(document.getElementById(contentPlaceholder+'_txtMobileNo'),ContactDetails_Err11,true))
              {             
                    return false;
              }   
              else if(!chkPinPhoneFaxNew(document.getElementById(contentPlaceholder+'_txtTelephoneNoHomeISD'),document.getElementById(contentPlaceholder+'_txtTelephoneNoHomeSTD'),document.getElementById(contentPlaceholder+'_txtTelephoneNoHome'),ContactDetails_Err12,ContactDetails_Err13,ContactDetails_Err14,ContactDetails_Err25,ContactDetails_Err26,ContactDetails_Err27))
              {
                return false;
              } 
              else if(!chkPinPhoneFaxNew(document.getElementById(contentPlaceholder+'_txtTelephoneNoBusinessISD'),document.getElementById(contentPlaceholder+'_txtTelephoneNoBusinessSTD'),document.getElementById(contentPlaceholder+'_txtTelephoneNoBusiness'),ContactDetails_Err15,ContactDetails_Err16,ContactDetails_Err17,ContactDetails_Err28,ContactDetails_Err29,ContactDetails_Err30))
              {
                return false;
              } 
              else if(!chkPinPhoneFaxNew(document.getElementById(contentPlaceholder+'_txtFaxNoISD'),document.getElementById(contentPlaceholder+'_txtFaxNoSTD'),document.getElementById(contentPlaceholder+'_txtFaxNo'),ContactDetails_Err18,ContactDetails_Err19,ContactDetails_Err20,ContactDetails_Err31,ContactDetails_Err32,ContactDetails_Err33))
              {
                return false;
              } 
              else if(!chkPinPhoneFaxNew(document.getElementById(contentPlaceholder+'_txtMobileNoISD'),document.getElementById(contentPlaceholder+'_txtMobileNoSTD'),document.getElementById(contentPlaceholder+'_txtMobileNo'),ContactDetails_Err21,ContactDetails_Err22,ContactDetails_Err23,ContactDetails_Err34,ContactDetails_Err35,ContactDetails_Err36))
              {
                return false;
              } 
                 // Check for the validity of email address
	         else if(!checkEmail(document.getElementById(contentPlaceholder+'_txtEmailAddress'),ContactDetails_Err7,false))
	            {	              
	                return false;
	            }
	                 //saurabh... to check if textbox for PO Box is not empty for UAE
               else if(document.getElementById(contentPlaceholder+'_ddlCountry').options[document.getElementById(contentPlaceholder+'_ddlCountry').selectedIndex].value == CountryFor_POBox_Error)
                 {                  
                   if(!checkTextBox(document.getElementById(contentPlaceholder+'_txtPoBoxNo'),RegisterPersonal_Err24))
                      {
                        return false;
                      }
                 }
                 //end saurabh
	          // Set display of all divs as none
	         document.getElementById(divRegistrationPersonalDetails).style.display = 'none';
             document.getElementById(divRegistrationContactDetails).style.display = 'none';
             document.getElementById(divRegistrationPreferences).style.display = 'none';
             document.getElementById(divRegistrationReviewDetails).style.display = 'none';
             document.getElementById(divValidateContactDetails).style.display = 'none'; 
             document.getElementById(divValidateReviewDetails).style.display = 'none'; 
             document.getElementById(divValidatePersonalDetails).style.display = 'none'; 
             document.getElementById(divValidatePreferences).style.display = 'none'; 
	         // Display the required divs	
	        document.getElementById(divRegistrationPreferences).style.display = '';
	        document.getElementById(divValidatePreferences).style.display = ''; 
	        // Preferences
	        // Headers
	        if (document.getElementById(contentPlaceholder+'_ContentPlaceholderHeader__ControlWrapper_RichHtmlField') != null)
	        {
	            document.getElementById(contentPlaceholder+'_ContentPlaceholderHeader__ControlWrapper_RichHtmlField').style.display = 'none';
	        }
	        else if (document.getElementById(contentPlaceholder+'_CUGContentPlaceholderHeader__ControlWrapper_RichHtmlField') != null)
	        {
	            document.getElementById(contentPlaceholder+'_CUGContentPlaceholderHeader__ControlWrapper_RichHtmlField').style.display = 'none';
	        }
           document.getElementById(contentPlaceholder+'_ContentPlaceholderHeaderContactDtls__ControlWrapper_RichHtmlField').style.display = 'none';
           document.getElementById(contentPlaceholder+'_ContentPlaceholderHeaderPreferences__ControlWrapper_RichHtmlField').style.display = '';
           document.getElementById(contentPlaceholder+'_ContentPlaceholderHeaderRvwDtls__ControlWrapper_RichHtmlField').style.display = 'none';
	        // Footers
            if (document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterHeading__ControlWrapper_RichHtmlField') != null)
            {
                document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterHeading__ControlWrapper_RichHtmlField').style.display = 'none';
            }
            else if (document.getElementById(contentPlaceholder+'_CUGContentPlaceholderFooter__ControlWrapper_RichHtmlField') != null)
            {
                document.getElementById(contentPlaceholder+'_CUGContentPlaceholderFooter__ControlWrapper_RichHtmlField').style.display = 'none';
            }
            document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterContactDtls__ControlWrapper_RichHtmlField').style.display = 'none';
            document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterPreferences__ControlWrapper_RichHtmlField').style.display = '';
            document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterRvwDtls__ControlWrapper_RichHtmlField').style.display = 'none';
	        document.getElementById(contentPlaceholder+'_ddlSeatPreference').focus();
	        // Set the index from current status to next status
	        jsindex = 3;
  }	
else if(jsindex==3)
  {
    // Set display of all divs as none
    document.getElementById(divRegistrationPersonalDetails).style.display = 'none';
    document.getElementById(divRegistrationContactDetails).style.display = 'none';
    document.getElementById(divRegistrationPreferences).style.display = 'none';
    document.getElementById(divRegistrationReviewDetails).style.display = 'none';
    document.getElementById(divValidateContactDetails).style.display = 'none'; 
    document.getElementById(divValidateReviewDetails).style.display = 'none'; 
    document.getElementById(divValidatePersonalDetails).style.display = 'none'; 
    document.getElementById(divValidatePreferences).style.display = 'none'; 
    // Display the required divs
	document.getElementById(divRegistrationReviewDetails).style.display = '';
	document.getElementById(divValidateReviewDetails).style.display = ''; 
    // Review Details
    // Headers
    if (document.getElementById(contentPlaceholder+'_ContentPlaceholderHeader__ControlWrapper_RichHtmlField') != null)
    {
        document.getElementById(contentPlaceholder+'_ContentPlaceholderHeader__ControlWrapper_RichHtmlField').style.display = 'none';
    }
    else if (document.getElementById(contentPlaceholder+'_CUGContentPlaceholderHeader__ControlWrapper_RichHtmlField') != null)
    {
        document.getElementById(contentPlaceholder+'_CUGContentPlaceholderHeader__ControlWrapper_RichHtmlField').style.display = 'none';
    }
    document.getElementById(contentPlaceholder+'_ContentPlaceholderHeaderContactDtls__ControlWrapper_RichHtmlField').style.display = 'none';
    document.getElementById(contentPlaceholder+'_ContentPlaceholderHeaderPreferences__ControlWrapper_RichHtmlField').style.display = 'none';
    document.getElementById(contentPlaceholder+'_ContentPlaceholderHeaderRvwDtls__ControlWrapper_RichHtmlField').style.display = '';
    // Footers
    if (document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterHeading__ControlWrapper_RichHtmlField') != null)
    {
        document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterHeading__ControlWrapper_RichHtmlField').style.display = 'none';
    }
    else if (document.getElementById(contentPlaceholder+'_CUGContentPlaceholderFooter__ControlWrapper_RichHtmlField') != null)
    {
        document.getElementById(contentPlaceholder+'_CUGContentPlaceholderFooter__ControlWrapper_RichHtmlField').style.display = 'none';
    }
    document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterContactDtls__ControlWrapper_RichHtmlField').style.display = 'none';
    document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterPreferences__ControlWrapper_RichHtmlField').style.display = 'none';
    document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterRvwDtls__ControlWrapper_RichHtmlField').style.display = '';
    // Display the values from the previous divs to the review details 	
    document.getElementById(contentPlaceholder+'_lblSalutationRT').innerHTML = document.getElementById(contentPlaceholder+'_ddlSalutation').options[document.getElementById(contentPlaceholder+'_ddlSalutation').selectedIndex].value ;
    document.getElementById(contentPlaceholder+'_hfTitle').value = document.getElementById(contentPlaceholder+'_ddlSalutation').options[document.getElementById(contentPlaceholder+'_ddlSalutation').selectedIndex].value ;
	document.getElementById(contentPlaceholder+'_lblFirstNameRT').innerHTML = document.getElementById(contentPlaceholder+'_txtFirstName').value ;
    
    if(document.getElementById(contentPlaceholder+'_txtMiddleName').value == "")
    {
       document.getElementById(contentPlaceholder+'_lblMiddleNameRT').innerHTML = "-" ;
    }
    else
    {
     document.getElementById(contentPlaceholder+'_lblMiddleNameRT').innerHTML = document.getElementById(contentPlaceholder+'_txtMiddleName').value ;
    }
        
    document.getElementById(contentPlaceholder+'_lblLastNameRT').innerHTML = document.getElementById(contentPlaceholder+'_txtLastName').value ;   
    if(document.getElementById(contentPlaceholder+'_txtFirstNameArabic').value == "")
    {        
    document.getElementById(contentPlaceholder+'_lblFirstNameArabicRT').innerHTML = "-" ;    
    }
    else
    {
    document.getElementById(contentPlaceholder+'_lblFirstNameArabicRT').innerHTML = document.getElementById(contentPlaceholder+'_txtFirstNameArabic').value ;    
    }    
    if(document.getElementById(contentPlaceholder+'_txtMiddleNameArabic').value == "")
    {
      document.getElementById(contentPlaceholder+'_lblMiddleNameArabicRT').innerHTML = "-" ;
	}
	else
	{
	    document.getElementById(contentPlaceholder+'_lblMiddleNameArabicRT').innerHTML = document.getElementById(contentPlaceholder+'_txtMiddleNameArabic').value ;
	}
	
	if( document.getElementById(contentPlaceholder+'_txtLastNameArabic').value == "")
	{
	    document.getElementById(contentPlaceholder+'_lblLastNameArabicRT').innerHTML ="-" ;
	}
	else
	{
	 document.getElementById(contentPlaceholder+'_lblLastNameArabicRT').innerHTML = document.getElementById(contentPlaceholder+'_txtLastNameArabic').value ;
	}
	document.getElementById(contentPlaceholder+'_lblFirstNamePpRT').innerHTML = document.getElementById(contentPlaceholder+'_txtFirstNamePp').value ;
	document.getElementById(contentPlaceholder+'_lblLastNamePpRT').innerHTML = document.getElementById(contentPlaceholder+'_txtLastNamePp').value ;	
	document.getElementById(contentPlaceholder+'_lblDobRT').innerHTML = document.getElementById(contentPlaceholder+'_ddbDate').options[document.getElementById(contentPlaceholder+'_ddbDate').selectedIndex].value + "/ " + document.getElementById(contentPlaceholder+'_ddbMonth').options[document.getElementById(contentPlaceholder+'_ddbMonth').selectedIndex].value + "/ " + document.getElementById(contentPlaceholder+'_ddbYear').options[document.getElementById(contentPlaceholder+'_ddbYear').selectedIndex].value;    
    if(document.getElementById(contentPlaceholder+'_ddlNationality').options[document.getElementById(contentPlaceholder+'_ddlNationality').selectedIndex].value == "--Select--")
    {
       document.getElementById(contentPlaceholder+'_lblNationalityRT').innerHTML = "-";
    }
    else
    {
        document.getElementById(contentPlaceholder+'_lblNationalityRT').innerHTML = document.getElementById(contentPlaceholder+'_ddlNationality').options[document.getElementById(contentPlaceholder+'_ddlNationality').selectedIndex].value;
    }    
     if(document.getElementById(contentPlaceholder+'_rdbListGender_0').checked)
    {                                      
       var checkBoxInterest1 = document.getElementById(contentPlaceholder+'_rdbListGender_0').nextSibling;       
       while(checkBoxInterest1.nodeName.toLowerCase()!='label') 
            {
                checkBoxInterest1=checkBoxInterest1.nextSibling;      
            }  
       document.getElementById(contentPlaceholder+'_lblGenderRT').innerHTML = checkBoxInterest1.firstChild.nodeValue;                                                          
    }
    else if(document.getElementById(contentPlaceholder+'_rdbListGender_1').checked)
    {
         var checkBoxInterest1 = document.getElementById(contentPlaceholder+'_rdbListGender_1').nextSibling;
       
       while(checkBoxInterest1.nodeName.toLowerCase()!='label') 
            {
                checkBoxInterest1=checkBoxInterest1.nextSibling;      
            }                                                 
 
       document.getElementById(contentPlaceholder+'_lblGenderRT').innerHTML = checkBoxInterest1.firstChild.nodeValue;     
    }	
	if(document.getElementById(contentPlaceholder+'_txtPpNo').value == "")
	{
	document.getElementById(contentPlaceholder+'_lblPpNoRT').innerHTML = "-" ;
	}
	else
	{
	  document.getElementById(contentPlaceholder+'_lblPpNoRT').innerHTML = document.getElementById(contentPlaceholder+'_txtPpNo').value ;
	}
    document.getElementById(contentPlaceholder+'_lblUserIdRT').innerHTML = document.getElementById(contentPlaceholder+'_txtUserId').value ;
	 if(document.getElementById(contentPlaceholder+'_rdbListAddressType_0').checked)
    {                                      
       var checkBoxInterest1 = document.getElementById(contentPlaceholder+'_rdbListAddressType_0').nextSibling;
       
       while(checkBoxInterest1.nodeName.toLowerCase()!='label') 
            {
                checkBoxInterest1=checkBoxInterest1.nextSibling;      
            }                                                 
 
       document.getElementById(contentPlaceholder+'_lblAddressTypeRT').innerHTML = checkBoxInterest1.firstChild.nodeValue;                                                          
    }
    else if(document.getElementById(contentPlaceholder+'_rdbListAddressType_1').checked)
    {
         var checkBoxInterest1 = document.getElementById(contentPlaceholder+'_rdbListAddressType_1').nextSibling;
       
       while(checkBoxInterest1.nodeName.toLowerCase()!='label') 
            {
                checkBoxInterest1=checkBoxInterest1.nextSibling;      
            }                                                 
 
       document.getElementById(contentPlaceholder+'_lblAddressTypeRT').innerHTML = checkBoxInterest1.firstChild.nodeValue;     
    }
 if(document.getElementById(contentPlaceholder+'_rdbListPreferredLanguage_0').checked)
    {                                      
       var checkBoxInterest1 = document.getElementById(contentPlaceholder+'_rdbListPreferredLanguage_0').nextSibling;
       
       while(checkBoxInterest1.nodeName.toLowerCase()!='label') 
            {
                checkBoxInterest1=checkBoxInterest1.nextSibling;      
            }                                                 
        document.getElementById(contentPlaceholder+'_hfPreferredLanguage').value = checkBoxInterest1.firstChild.nodeValue;                                                          
        
       document.getElementById(contentPlaceholder+'_lblPreferredLanguageRT').innerHTML = checkBoxInterest1.firstChild.nodeValue;                                                          
    }
    else if(document.getElementById(contentPlaceholder+'_rdbListPreferredLanguage_1').checked)
    {
         var checkBoxInterest1 = document.getElementById(contentPlaceholder+'_rdbListPreferredLanguage_1').nextSibling;
       
       while(checkBoxInterest1.nodeName.toLowerCase()!='label') 
            {
                checkBoxInterest1=checkBoxInterest1.nextSibling;      
            }                                                 
        document.getElementById(contentPlaceholder+'_hfPreferredLanguage').value = checkBoxInterest1.firstChild.nodeValue;                                                          
          document.getElementById(contentPlaceholder+'_lblPreferredLanguageRT').innerHTML = checkBoxInterest1.firstChild.nodeValue;
         }
	
	if(document.getElementById(contentPlaceholder+'_txtCompanyName').value == "")
	{	
	    document.getElementById(contentPlaceholder+'_lblCompanyNameRT').innerHTML = "-";
	}
	else
	{
	    document.getElementById(contentPlaceholder+'_lblCompanyNameRT').innerHTML = document.getElementById(contentPlaceholder+'_txtCompanyName').value ;
	}
	
	if(document.getElementById(contentPlaceholder+'_txtJobTitle').value == "")
	{
	document.getElementById(contentPlaceholder+'_lblJobTitleRT').innerHTML = "-" ;
	}
	else
	{
	document.getElementById(contentPlaceholder+'_lblJobTitleRT').innerHTML = document.getElementById(contentPlaceholder+'_txtJobTitle').value ;
	}
	if(document.getElementById(contentPlaceholder+'_txtDepartment').value == "")
	{
	document.getElementById(contentPlaceholder+'_lblDepartmentRT').innerHTML = "-" ;
	}
	else
	{
	document.getElementById(contentPlaceholder+'_lblDepartmentRT').innerHTML = document.getElementById(contentPlaceholder+'_txtDepartment').value ;
	}	
	if(document.getElementById(contentPlaceholder+'_txtPoBoxNo').value == "")
	{
		document.getElementById(contentPlaceholder+'_lblPoBoxNoRT').innerHTML = "-";
	}
	else
	{
	document.getElementById(contentPlaceholder+'_lblPoBoxNoRT').innerHTML = document.getElementById(contentPlaceholder+'_txtPoBoxNo').value ;
	}		
	document.getElementById(contentPlaceholder+'_lblAddressline1RT').innerHTML = document.getElementById(contentPlaceholder+'_txtAddressLine1').value ;
    
    if(document.getElementById(contentPlaceholder+'_txtAddressLine2').value == "")
    {
    document.getElementById(contentPlaceholder+'_lblAddressLine2RT').innerHTML = "-" ;
	}
	else
	{
	 document.getElementById(contentPlaceholder+'_lblAddressLine2RT').innerHTML = document.getElementById(contentPlaceholder+'_txtAddressLine2').value ;
	} 
	document.getElementById(contentPlaceholder+'_lblCityRT').innerHTML = document.getElementById(contentPlaceholder+'_txtCity').value;
    
    if(document.getElementById(contentPlaceholder+'_txtPostalCode').value == "")
    {
     document.getElementById(contentPlaceholder+'_lblPostalCodeRT').innerHTML = "-" ;
     }
     else
     {
     document.getElementById(contentPlaceholder+'_lblPostalCodeRT').innerHTML = document.getElementById(contentPlaceholder+'_txtPostalCode').value ;
     }
    
    if(document.getElementById(contentPlaceholder+'_txtState').value == "")
    {
        document.getElementById(contentPlaceholder+'_lblStateRT').innerHTML = "-" ;
	}
	else
	{
	document.getElementById(contentPlaceholder+'_lblStateRT').innerHTML = document.getElementById(contentPlaceholder+'_txtState').value ;
	}	
	document.getElementById(contentPlaceholder+'_lblCountryRT').innerHTML = document.getElementById(contentPlaceholder+'_ddlCountry').options[document.getElementById(contentPlaceholder+'_ddlCountry').selectedIndex].value;
	
	if(document.getElementById(contentPlaceholder+'_txtTelephoneNoHome').value == "")
	{
	  document.getElementById(contentPlaceholder+'_lblTelephoneNoHomeRT').innerHTML = "-" ;
	}
	else
	{
//	 document.getElementById('HiddenFieldHome').value = document.getElementById(contentPlaceholder+'_txtTelephoneNoHomeISD').value+'~' +document.getElementById(contentPlaceholder+'_txtTelephoneNoHomeSTD').value+'~'+ document.getElementById(contentPlaceholder+'_txtTelephoneNoHome').value ;
	 document.getElementById(contentPlaceholder+'_lblTelephoneNoHomeRT').innerHTML =document.getElementById(contentPlaceholder+'_txtTelephoneNoHomeISD').value+document.getElementById(contentPlaceholder+'_txtTelephoneNoHomeSTD').value+ document.getElementById(contentPlaceholder+'_txtTelephoneNoHome').value ;
	}
	if(document.getElementById(contentPlaceholder+'_txtTelephoneNoBusiness').value == "")
	{
		document.getElementById(contentPlaceholder+'_lblTelephoneNoBusinessRT').innerHTML = "-" ;
	}
	else
	{
//	document.getElementById('HiddenFieldBusiness').value=document.getElementById(contentPlaceholder+'_txtTelephoneNoBusinessISD').value +'~'+ document.getElementById(contentPlaceholder+'_txtTelephoneNoBusinessSTD').value +'~'+ document.getElementById(contentPlaceholder+'_txtTelephoneNoBusiness').value ;
	document.getElementById(contentPlaceholder+'_lblTelephoneNoBusinessRT').innerHTML =document.getElementById(contentPlaceholder+'_txtTelephoneNoBusinessISD').value + document.getElementById(contentPlaceholder+'_txtTelephoneNoBusinessSTD').value + document.getElementById(contentPlaceholder+'_txtTelephoneNoBusiness').value ;
	}
	if(document.getElementById(contentPlaceholder+'_txtFaxNo').value == "")
	{
		document.getElementById(contentPlaceholder+'_lblFaxNoRT').innerHTML = "-" ;
	}
	else
	{
//	document.getElementById('HiddenFieldFax').value = document.getElementById(contentPlaceholder+'_txtFaxNoISD').value+'~'+document.getElementById('txtFaxNoSTD').value + '~'+document.getElementById('txtFaxNo').value ;
	document.getElementById(contentPlaceholder+'_lblFaxNoRT').innerHTML =document.getElementById(contentPlaceholder+'_txtFaxNoISD').value+document.getElementById(contentPlaceholder+'_txtFaxNoSTD').value + document.getElementById(contentPlaceholder+'_txtFaxNo').value ;
	}
	
	if(document.getElementById(contentPlaceholder+'_txtMobileNo').value == "")
	{
		document.getElementById(contentPlaceholder+'_lblMobileNoRT').innerHTML = "-" ;
	}
	else
	{	
//	document.getElementById('HiddenFieldMobile').value = document.getElementById('txtMobileNoISD').value+'~'+ document.getElementById('txtMobileNoSTD').value+'~'+  document.getElementById('txtMobileNo').value ;	
	document.getElementById(contentPlaceholder+'_lblMobileNoRT').innerHTML =document.getElementById(contentPlaceholder+'_txtMobileNoISD').value+ document.getElementById(contentPlaceholder+'_txtMobileNoSTD').value+ document.getElementById(contentPlaceholder+'_txtMobileNo').value ;
	}	
	if(document.getElementById(contentPlaceholder+'_txtEmailAddress').value == "")
	{
		document.getElementById(contentPlaceholder+'_lblEmailAddressRT').innerHTML = "-" ;
	}
	else
	{
	document.getElementById(contentPlaceholder+'_lblEmailAddressRT').innerHTML = document.getElementById(contentPlaceholder+'_txtEmailAddress').value ;
	}	
	if( document.getElementById(contentPlaceholder+'_ddlSeatPreference').options[document.getElementById(contentPlaceholder+'_ddlSeatPreference').selectedIndex].value == "--Select--")
	{
	    document.getElementById(contentPlaceholder+'_lblSeatPreferRT').innerHTML  = "-";
	}
	else
	{
	        document.getElementById(contentPlaceholder+'_lblSeatPreferRT').innerHTML = document.getElementById(contentPlaceholder+'_ddlSeatPreference').options[document.getElementById(contentPlaceholder+'_ddlSeatPreference').selectedIndex].value;
	}	
	if( document.getElementById(contentPlaceholder+'_ddlPreferredHolMon').options[document.getElementById(contentPlaceholder+'_ddlPreferredHolMon').selectedIndex].value == "--Select--")
	{
	    document.getElementById(contentPlaceholder+'_lblPreferredHolMonRT').innerHTML  = "-";
	}
	else
	{
	       document.getElementById(contentPlaceholder+'_lblPreferredHolMonRT').innerHTML =  document.getElementById(contentPlaceholder+'_ddlPreferredHolMon').options[document.getElementById(contentPlaceholder+'_ddlPreferredHolMon').selectedIndex].value;
	}
	
	if(document.getElementById(contentPlaceholder+'_ddlCommPrefChannel').options[document.getElementById(contentPlaceholder+'_ddlCommPrefChannel').selectedIndex].value == "--Select--")
	{
	    document.getElementById(contentPlaceholder+'_lblCommunicationPreferenceRT1').innerHTML  = "-";
	}
	else
	{
	      document.getElementById(contentPlaceholder+'_lblCommunicationPreferenceRT1').innerHTML =  document.getElementById(contentPlaceholder+'_ddlCommPrefChannel').options[document.getElementById(contentPlaceholder+'_ddlCommPrefChannel').selectedIndex].value;
	}
		
	if(document.getElementById(contentPlaceholder+'_ddlMeal').options[document.getElementById(contentPlaceholder+'_ddlMeal').selectedIndex].value == "--Select--")
	{
		document.getElementById(contentPlaceholder+'_lblMealPreferenceRT').innerHTML = "-";
    }
    else
    {
        document.getElementById(contentPlaceholder+'_lblMealPreferenceRT').innerHTML = document.getElementById(contentPlaceholder+'_ddlMeal').options[document.getElementById(contentPlaceholder+'_ddlMeal').selectedIndex].value;
    }
  // Code for interests using checkbox list
  //Code changed by Sugeet on 22 Nov,2006
    if(  document.getElementById(contentPlaceholder+'_chkListInterest_0').checked == true)
    {                                        
        var idForInterest1 = returnEmptyInterestField();
     //  document.getElementById(idForInterest1).innerHTML = checkBoxInterest1.firstChild.nodeValue;                                                          
     document.getElementById(idForInterest1).innerHTML = lblvalueofinterest1;                                                          
    }  

    if(  document.getElementById(contentPlaceholder+'_chkListInterest_1').checked)
    {                          
             var idForInterest2 = returnEmptyInterestField();                                    
     //  document.getElementById(idForInterest2).innerHTML = checkBoxInterest2.firstChild.nodeValue;
     document.getElementById(idForInterest2).innerHTML = lblvalueofinterest2;
    }   
 
    if(  document.getElementById(contentPlaceholder+'_chkListInterest_2').checked)
    {                                                                             
  var idForInterest3 = returnEmptyInterestField();
       // document.getElementById(idForInterest3).innerHTML = checkBoxInterest3.firstChild.nodeValue; 
        document.getElementById(idForInterest3).innerHTML = lblvalueofinterest3; 
    }
    if(  document.getElementById(contentPlaceholder+'_chkListInterest_3').checked)
    {                                     
         var idForInterest4 = returnEmptyInterestField();                                      
      //  document.getElementById(idForInterest4).innerHTML = checkBoxInterest4.firstChild.nodeValue; 
      document.getElementById(idForInterest4).innerHTML = lblvalueofinterest4; 
    }
    if(  document.getElementById(contentPlaceholder+'_chkListInterest_4').checked)
    {                                   
         var idForInterest5 = returnEmptyInterestField();                                      
     //   document.getElementById(idForInterest5).innerHTML = checkBoxInterest5.firstChild.nodeValue;  
        document.getElementById(idForInterest5).innerHTML = lblvalueofinterest5;  
    } 
    if(  document.getElementById(contentPlaceholder+'_chkListInterest_5').checked)
    {  
         var idForInterest6 = returnEmptyInterestField();
		document.getElementById(idForInterest6).innerHTML = lblvalueofinterest6;  
    } 
     if(  document.getElementById(contentPlaceholder+'_chkListInterest_6').checked)
    {                          
         var idForInterest7 = returnEmptyInterestField(); 
		 document.getElementById(idForInterest7).innerHTML = lblvalueofinterest7;  
    } 
     if(  document.getElementById(contentPlaceholder+'_chkListInterest_7').checked)
    {                          
         var idForInterest8 = returnEmptyInterestField();     
        document.getElementById(idForInterest8).innerHTML = lblvalueofinterest8;
    } 
     if(  document.getElementById(contentPlaceholder+'_chkListInterest_8').checked)
    {  
         var idForInterest9 = returnEmptyInterestField();                                        
		document.getElementById(idForInterest9).innerHTML = lblvalueofinterest9;  
    } 
     if(  document.getElementById(contentPlaceholder+'_chkListInterest_9').checked)
    {                          
         var idForInterest10 = returnEmptyInterestField();                                        
		 document.getElementById(idForInterest10).innerHTML = lblvalueofinterest10;   
    } 
     if(  document.getElementById(contentPlaceholder+'_chkListInterest_10').checked)
    {                 
         var idForInterest11 = returnEmptyInterestField();                              
        document.getElementById(idForInterest11).innerHTML = lblvalueofinterest11;    
    } 
     if(  document.getElementById(contentPlaceholder+'_chkListInterest_11').checked)
    {                  
         var idForInterest12 = returnEmptyInterestField();                              
		 document.getElementById(idForInterest12).innerHTML = lblvalueofinterest12;   
    } 
     if(  document.getElementById(contentPlaceholder+'_chkListInterest_12').checked)
    {                          
         var idForInterest13 = returnEmptyInterestField();                              
		document.getElementById(idForInterest13).innerHTML = lblvalueofinterest13;  
    } 
     if(  document.getElementById(contentPlaceholder+'_chkListInterest_13').checked)
    {                          
         var idForInterest14 = returnEmptyInterestField();                              
		 document.getElementById(idForInterest14).innerHTML = lblvalueofinterest14;   
    } 
     if(  document.getElementById(contentPlaceholder+'_chkListInterest_14').checked)
    {                                      
         var idForInterest15 = returnEmptyInterestField();                              
	    document.getElementById(idForInterest15).innerHTML = lblvalueofinterest15;  
    } 
   putDashInterest();
   	document.getElementById(contentPlaceholder+'_lbtnNext3').focus();
	// Set the index from current status to next status
    jsindex = 4;
	}
	// If current div is of Review details 	
    else if (jsindex == 4 )
    {
      // Submit the form for postback
        if(document.getElementById(contentPlaceholder+'_chkTerms').checked)
        {        
            if(alreadyClicked == 0)
            {
                alreadyClicked = 1;
                return true;
            }
            else
            {
                return false;
            }
        }
        else
        {
            alert(guestRegistrationErr1);
            return false;
        }
    }
  // If current div is not Review Details   
  return false;
}

function radioButtonAddress()
{
/******************************************************************************
/Purpose:	It is called on click of Radiobutton Button Home or Business 
/Inputs:	void
/Returns:	void
/*****************************************************************************/       
    // If Radiobutton Home is checked 
    if(document.getElementById(contentPlaceholder+'_rdbListAddressType_0').checked )
	{
	    // Disable the Company Name, Job Title, Department
	    //document.getElementById('txtCompanyName').value = "" ;
	    //document.getElementById('txtJobTitle').value = "" ;
	    //document.getElementById('txtDepartment').value = "" ;
	    document.getElementById(contentPlaceholder+'_txtCompanyName').disabled = true ;
	    document.getElementById(contentPlaceholder+'_txtJobTitle').disabled = true ;
	    document.getElementById(contentPlaceholder+'_txtDepartment').disabled = true ;
	    document.getElementById(contentPlaceholder+'_txtCompanyName').className = "disablegray";
	    document.getElementById(contentPlaceholder+'_txtJobTitle').className = "disablegray";
	    document.getElementById(contentPlaceholder+'_txtDepartment').className = "disablegray";
	
	}
	// If Radiobutton Business is checked 
	else if (document.getElementById(contentPlaceholder+'_rdbListAddressType_1').checked)
	{ 
	    // Enable the Company Name, Job Title, Department
	    document.getElementById(contentPlaceholder+'_txtCompanyName').disabled = false ;
	    document.getElementById(contentPlaceholder+'_txtJobTitle').disabled = false ;
        document.getElementById(contentPlaceholder+'_txtDepartment').disabled = false ;
        document.getElementById(contentPlaceholder+'_txtCompanyName').className = "enablewhite";
	    document.getElementById(contentPlaceholder+'_txtJobTitle').className = "enablewhite";
	    document.getElementById(contentPlaceholder+'_txtDepartment').className = "enablewhite";
    }
} 

function radioButtonName()
{
/******************************************************************************
/Purpose:	It is called on click of Radiobutton Button English or Arabic 
/Inputs:	void
/Returns:	void
/*****************************************************************************/        
    // If Radiobutton English Name is checked 
    if(document.getElementById(contentPlaceholder+'_rdbListPreferredLanguage_1').checked )
	{
	// Enable the First Name, MiddleName and Last Name
	    document.getElementById(contentPlaceholder+'_txtFirstNameArabic').disabled = true ;
	    document.getElementById(contentPlaceholder+'_txtMiddleNameArabic').disabled = true ;
	    document.getElementById(contentPlaceholder+'_txtLastNameArabic').disabled = true ;
	     document.getElementById(contentPlaceholder+'_txtFirstNameArabic').className = "disablegray" ;
	    document.getElementById(contentPlaceholder+'_txtMiddleNameArabic').className = "disablegray";
	    document.getElementById(contentPlaceholder+'_txtLastNameArabic').className = "disablegray";
	    populateDropDownEnglish();
	}
	// If Radiobutton Arabic Name is checked 
	else if (document.getElementById(contentPlaceholder+'_rdbListPreferredLanguage_0').checked)
	{
	// Disable the First Name, MiddleName and Last Name
	    document.getElementById(contentPlaceholder+'_txtFirstNameArabic').disabled = false ;
	    document.getElementById(contentPlaceholder+'_txtMiddleNameArabic').disabled = false ;
	    document.getElementById(contentPlaceholder+'_txtLastNameArabic').disabled = false ;
	     document.getElementById(contentPlaceholder+'_txtFirstNameArabic').className = "enablewhite" ;
	    document.getElementById(contentPlaceholder+'_txtMiddleNameArabic').className = "enablewhite";
	    document.getElementById(contentPlaceholder+'_txtLastNameArabic').className = "enablewhite";
	    populateDropDownArabic();
	}
} 

function populateDropDownEnglish()
{
    
    var title = document.getElementById(contentPlaceholder+'_ddlSalutation');
  	//Clears the dest combo box contents.
	for (var count = title.options.length-1; count >-1; count--)
	{
	
	  title.options[count] = null;
	}
	var textValueForTitle; 
	var optionItem;
	var valueForTitle;
		
	//Add new dests list to the dest combo box.
	for (var count = 0; count < titleArrayEnglish.length; count++)
	{
	 	textValueForTitle = titleArrayEnglish[count];
	 
   		valueForTitle = titleArrayEnglish[count];
		optionItem = new Option( textValueForTitle, valueForTitle,  false, false);
        title.options[count] = optionItem;
	}
}
function populateDropDownArabic()
{

    var title = document.getElementById(contentPlaceholder+'_ddlSalutation');
             
    
  	//Clears the dest combo box contents.
	for (var count = title.options.length-1; count >-1; count--)
	{
	  title.options[count] = null;
	}
	var textValueForTitle; 
	var optionItem;
	var valueForTitle;
		
	//Add new dests list to the dest combo box.
	for (var count = 0; count < titleArrayArabic.length; count++)
	{
	 	textValueForTitle = titleArrayArabic[count];   			
   		valueForTitle = titleArrayArabic[count];
		optionItem = new Option( textValueForTitle, valueForTitle,  false, false);
        title.options[count] = optionItem;
	}
}

function validateCheckbox(Preference_Err1,i)
{

/******************************************************************************
/Purpose:	It is called on click of Check Box List 
/Inputs:	void
/Returns:	void
/*****************************************************************************/

// Initialise the variables
 indexForCheckbox = 0;
 var indexForCheckboxChecked = 0;
// Check the number of checkboxes which are checked
 while(indexForCheckbox <15)
    {
        var tempString = contentPlaceholder+"_chkListInterest_" + indexForCheckbox;
        var chkListInterest = document.getElementById(tempString);
        
        if(chkListInterest.checked)    
        {
         indexForCheckboxChecked++;
        }
        indexForCheckbox ++;       
    }
 //If the number of checkboxes which are checked is greater than 5
 if(indexForCheckboxChecked >= 6 )
  {
      var tempString = contentPlaceholder+"_chkListInterest_" + i;
      // Display the error message
      alert(Preference_Err1);
      
      // Uncheck the currently checked Checkbox
      var chkListInterest = document.getElementById(tempString);
      chkListInterest.checked = false;
      return false;
  }
}
/*gtb start*/
/************************************************************************************************************
(C) www.dhtmlgoodies.com, November 2005

This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.	

Terms of use:
You are free to use this script as long as the copyright message is kept intact. However, you may not
redistribute, sell or repost it without our permission.

Thank you!

www.dhtmlgoodies.com
Alf Magne Kalleland

************************************************************************************************************/

var dhtmlgoodies_slideSpeed = 10;	// Higher value = faster
var dhtmlgoodies_timer = 10;	// Lower value = faster
var objectIdToSlideDown = false;
var dhtmlgoodies_activeId = false;
var dhtmlgoodies_slideInProgress = false;
var flag = true;
var selectedMilCal;
var loggedInYourAcc;
function showHideContent(inputId)
{	
	{
        if(selectedMilCal == 1)
        {
            inputId = defMilID;
        }        
        if((loggedInYourAcc == 1) && (selectedMilCal != 1))
        {      
            inputId = defAccID;
        }
        loggedInYourAcc = 0;
        selectedMilCal = 0;      
	    if(dhtmlgoodies_slideInProgress)return;
	    dhtmlgoodies_slideInProgress = true;
	    if(!flag)inputId = this.id;    	
	    inputId = inputId + '';    	 
	    var numericId = inputId.substring(28,29);    	
	    var divs = document.getElementsByTagName('DIV');
	    for(var no=0;no<divs.length;no++)
	    {
	    if(divs[no].className=='dhtmlgoodies_question')
		    {
	            var imagePathNuteral = "../Images/New Homepage/bg_gtb_but_bot.jpg";
	            document.getElementById(divs[no].id).style.backgroundImage = "url('" + imagePathNuteral + "')";
		        document.getElementById(divs[no].id).style.color = 'white';
		        document.getElementById(divs[no].id).style.fontWeight = 'normal';
		    }
	    }
	    var imagePath = "../Images/New Homepage/bg_gtb_but_bot_over.jpg";
	    document.getElementById(inputId).style.backgroundImage = "url('" + imagePath + "')";
	    document.getElementById(inputId).style.color = 'black';
	    document.getElementById(inputId).style.fontWeight = 'normal';
	    var answerDiv = document.getElementById('GuestToolBox1_dhtmlgoodies_a' + numericId);
	    objectIdToSlideDown = false;    	
	    if(!answerDiv.style.display || answerDiv.style.display=='none')
	    {
		    if(dhtmlgoodies_activeId &&  dhtmlgoodies_activeId!=numericId)
		    {
			    objectIdToSlideDown = numericId;
			    slideContent(dhtmlgoodies_activeId,(dhtmlgoodies_slideSpeed*-1));
		    }else
		    {
			    answerDiv.style.display='';
			    answerDiv.style.visibility = 'visible';
			    slideContent(numericId,dhtmlgoodies_slideSpeed);
		    }
	    }else{
		    slideContent(numericId,(dhtmlgoodies_slideSpeed*-1));
		    dhtmlgoodies_activeId = false;
	    }	
	}
}
    function slideContent(inputId,direction)
    {    	
	    var obj =document.getElementById('GuestToolBox1_dhtmlgoodies_a' + inputId);	 
	    var contentObj = document.getElementById('GuestToolBox1_dhtmlgoodies_ac' + inputId);
	    height = obj.clientHeight;
	    if(height==0)height = obj.offsetHeight;
	    height = height + direction;
	    rerunFunction = true;
	    if(height>contentObj.offsetHeight){
		    height = contentObj.offsetHeight;
		    rerunFunction = false;
	    }
	    if(height<=1){
		    height = 1;
		    rerunFunction = false;
	    }
	    obj.style.height = height + 'px';
	    var topPos = height - contentObj.offsetHeight;
	    if(topPos>0)topPos=0;
	    contentObj.style.top = topPos + 'px';
	    if(rerunFunction){
	    if(flag)
	    {
	    slideContent(inputId,direction);
	    flag = false;
	    }
	    else
		    setTimeout('slideContent(' + inputId + ',' + direction + ')',dhtmlgoodies_timer);
	    }else{
		    if(height<=1){
			    obj.style.display='none'; 
			    if(objectIdToSlideDown && objectIdToSlideDown!=inputId){
				    document.getElementById('GuestToolBox1_dhtmlgoodies_a' + objectIdToSlideDown).style.display='';
				    document.getElementById('GuestToolBox1_dhtmlgoodies_a' + objectIdToSlideDown).style.visibility='visible';
				    slideContent(objectIdToSlideDown,dhtmlgoodies_slideSpeed);				
			    }else{
				    dhtmlgoodies_slideInProgress = false;
			    }
		    }else{
			    dhtmlgoodies_activeId = inputId;
			    dhtmlgoodies_slideInProgress = false;
		    }
	    }
    }

var defaultId;
function initShowHideDivs()
{
  if(defaultId != undefined)
  {
	var divs = document.getElementsByTagName('DIV');
	var divCounter = 1;
	for(var no=0;no<divs.length;no++)
	{
	if(divs[no].className=='dhtmlgoodies_question')
		{
			divs[no].onclick = showHideContent;
			var answer = document.getElementById('GuestToolBox1_dhtmlgoodies_a'+ divCounter);
			answer.style.height='1px';
			divCounter++;
		}
	}
	showHideContent(defaultId);
  }	
}
window.onload = initShowHideDivs;
/*gtb end*/

function returnEmptyInterestField()
{
    for (v = 1 ; v<6 ; v++)
    {    
    var tempIDOfInterestReview = contentPlaceholder+'_lblInterest' + v+ 'RT';
    var tempValue = document.getElementById(tempIDOfInterestReview);        
        if(trim(tempValue.innerHTML) == "" )
        {          
            return tempIDOfInterestReview;
        }
    }
}
function clearInterestFields()
{
    for (v = 1 ; v<6 ; v++)
    {    
    var tempIDOfInterestReview = contentPlaceholder+'_lblInterest' + v+ 'RT';
    var tempValue = document.getElementById(tempIDOfInterestReview);        
     tempValue.innerHTML = ""; 
    }    
}

function putDashInterest()
{
for (v = 1 ; v<6 ; v++)
    {
     var tempIDOfInterestReview = contentPlaceholder+'_lblInterest' + v+ 'RT';
    var tempValue = document.getElementById(tempIDOfInterestReview);
        if(trim(tempValue.innerHTML) == "" )
        {
             tempValue.innerHTML = '-'; 
        }
    } 
}

function clearPreferenceFields()
{

    for (v = 2 ; v<6 ; v++)
    {
    
    var tempPreference = contentPlaceholder+'_lblCommunicationPreferenceRT' + v;
    var tempValue = document.getElementById(tempPreference);
        
     tempValue.innerHTML = ""; 
    }    
}

var controlID = "";
function fnTextUpdateAuto(controlID)
{
    if(controlID == contentPlaceholder+'_txtFirstNamePp')
    {
        document.getElementById(contentPlaceholder+'_txtFirstName').value = document.getElementById(controlID).value;
    }
    else if (controlID == contentPlaceholder+'_txtLastNamePp')
    {
       document.getElementById(contentPlaceholder+'_txtLastName').value = document.getElementById(controlID).value;
    }    
}

function DisplayPlaceHolder()
		{
		
		if (document.getElementById(contentPlaceholder+'_ContentPlaceholderHeader__ControlWrapper_RichHtmlField') != null)
		{
			document.getElementById(contentPlaceholder+'_ContentPlaceholderHeader__ControlWrapper_RichHtmlField').style.display = 'block';
		}
		document.getElementById(contentPlaceholder+'_ContentPlaceholderHeaderContactDtls__ControlWrapper_RichHtmlField').style.display = 'none';
		document.getElementById(contentPlaceholder+'_ContentPlaceholderHeaderPreferences__ControlWrapper_RichHtmlField').style.display = 'none';
		document.getElementById(contentPlaceholder+'_ContentPlaceholderHeaderRvwDtls__ControlWrapper_RichHtmlField').style.display = 'none';
		document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterContactDtls__ControlWrapper_RichHtmlField').style.display = 'none';
		document.getElementById(contentPlaceholder+'_ContentPlaceholderFooterPreferences__ControlWrapper_RichHtmlField').style.display = 'none';
	}


