function onlyNumbers(evt) 
{
var charCode = ( evt.which ) ? evt.which : event.keyCode;
return ( charCode >= 48 && charCode <= 57 );
}

var digits = "0123456789";
var phoneNumberDelimiters = "()- ";
var validWorldPhoneChars = phoneNumberDelimiters + "+";

var minDigitsInIPhoneNumber = 10;

function isInteger(s)
{   var i;
    for (i = 0; i < s.length; i++)
    {   
      
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
   
    return true;
}

function isIntegerEdit(s)
{   var i;
    for (i = 0; i < s.length; i++)
    {   
      
        var c = s.charAt(i);
        if (!((c == "0") || (c == "1") || (c == "2") || (c == "3") || (c == "4") || (c == "5") || (c == "6") || (c == "7") || (c == "8") || (c == "9") || (c == "."))) return false;
    }
  
    return true;
}

function Validate_Number(Form)
{
	if(document.forms[Form].travelerPhone.value != "")
	{
		if(isInteger(document.forms[Form].travelerPhone.value) == false)
		{
			document.forms[Form].travelerPhone.value = "";
			alert("Please enter numeric value");
			document.forms[Form].travelerPhone.focus();
			return false;
		}
	}
}

function Validate_Number1(Form)
{
	if(document.forms[Form].contactPhone.value != "")
	{
		if(isInteger(document.forms[Form].contactPhone.value) == false)
		{
			document.forms[Form].contactPhone.value = "";
			alert("Please enter numeric value");
			document.forms[Form].contactPhone.focus();
			return false;
		}
	}
}

function Validate_Number2(Form)
{
	if(document.forms[Form].contactMobile.value != "")
	{
		if(isInteger(document.forms[Form].contactMobile.value) == false)
		{
			document.forms[Form].contactMobile.value = "";
			alert("Please enter numeric value");
			document.forms[Form].contactMobile.focus();
			return false;
		}
	}
		return true;
}

function stripCharsInBag(s, bag)
{   var i;
    var returnString = "";
   
    for (i = 0; i < s.length; i++)
    {   
      
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

function checkInternationalPhone(strPhone){
s=stripCharsInBag(strPhone,validWorldPhoneChars);
return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);
}




function _vEmail(_c) {
 var emailIds = _c.split(",");
 for(var i=0;i<emailIds.length;i++){ 
  var _e = emailIds[i];
  _e = _e.toLowerCase().replace(/\s/g,"");
  _e = _e.replace(/(\.c0m|\.cm|\.cpm|\.cmo|\.ocm|\.co)$/, ".com");
  emailIds[i] = _e;
  var _re = /^[-\.a-z0-9_]+@([-\w]+\.)?([-\w]+\.)?([-\w]+)\.(com|net|org|edu|in|uk|sg|au|ca|ae|jp|sa|ru|fm|bt|nu|ie)$/;
  var _match = _re.test(_e);

  if(_match) {
   
    _e = _e.replace(/(rediff\.|reddif\.|redif\.|reddifmail\.|redifmail\.|rediffamil\.|readiffmail\.|rdiffmail\.|redffmail\.)/, "rediffmail.");
    _e = _e.replace(/(yahoomail\.|yaho\.|yah00\.|yahho\.)/, "yahoo.");
    emailIds[i] = _e;
    
     if(i == (emailIds.length-1)){
    	return true;
    }
  }
  else {
   
    var _errStr = "Please Correct Your Email Address:\n" + _e + "\n\n";
  

  
    var _arr = _e.split(/@/);
    if(_arr.length > 2) {
      _errStr += '- Enter a SINGLE Email Address.\n\tMore than 1 "@" in your Email.\n';
    }
    else {
      if(_arr.length == 1) {
        _errStr += '- "@" missing from your Email.\n';
      }

    
      var _bad = /[^-\.a-z0-9_@]/g;
      _arr = _e.match(_bad);
      var _s = "";
      if(_arr != null) {
        for(var i= 0; i < _arr.length; _s = _s + _arr[i] + " ", i++);
       
        _errStr += "- Following characters are not allowed in Email:\n\t" + _s + "\n";
      }

    
      var _retld = /\.(com|net|org|edu|in|uk|sg|au|ca|ae|jp|sa|ru|fm|bt|nu|ie)$/;
      if(!_retld.test(_e)) {
        _errStr += '- Your Email must end with one of these:\n\t.com .net .org .edu\n\t.in .uk .sg .au .ca .ae .jp .sa .ru .fm .bt .nu .ie\n';
      }
    }

    alert(_errStr);
  
    return false;
  }
  }
}

function Validator_AddScrollText(Form)
{    
		if (Form.scrollText.value == "")
		{	
			alert("Please Enter Scroll Text ");
			Form.scrollText.focus();
			return false;
		}
		if (Form.scrollText.value.length >200)
		{	
			alert("Scroll Text Is Greater Than 200 Char. ");
			Form.scrollText.value = "";
			Form.scrollText.focus();
			return false;
		}
	return true;
}

function Validator_ForgotAdminPassword(Form){ 

		if (Form.userName.value == "")
		{	
			alert("Please Enter Email Id");
			Form.userName.focus();
			return false;
		}
		if(_vEmail(Form.userName.value) == false){
			return false;
		}
}

function Validator_AdminLogin(Form){ 

		if (Form.userName.value == "")
		{	
			alert("Please Enter Email Id");
			Form.userName.focus();
			return false;
		}
		if(_vEmail(Form.userName.value) == false){
			return false;
		}
		if (Form.password.value == "")
		{	
			alert("Please Enter Password");
			Form.password.focus();
			return false;
		}
}

function Validator_MediaReview(Form){ 

	
		    if (Form.mediaName.value == "")
				{	
					alert("Please Enter Media Name");
					Form.mediaName.focus();
					return false;
				}
				if (Form.mediaShortDesc.value == "")
				{	
					alert("Please Enter Short Description");
					Form.mediaShortDesc.focus();
					return false;
				}	
				if(Form.method.value == "add")
				{
				if (Form.mediaImage.value == "")
				{	
					alert("Please select the Image");
					Form.mediaImage.focus();
					return false;
				}
				}	
				if (Form.mediaAuthor.value == "")
				{	
					alert("Please Enter Reviewer");
					Form.mediaAuthor.focus();
					return false;
				}	
				if (Form.mediaLanguage.value == "")
				{	
					alert("Please Enter Language");
					Form.mediaLanguage.focus();
					return false;
				}	
				if (Form.mediaRating.value == "0" || Form.mediaRating.value == "0.0")
				{	
					alert("Please Enter Rating");
					Form.mediaRating.focus();
					return false;
				}
				if (isIntegerEdit(Form.mediaRating.value) == false)
				{	
					alert("Please Enter Numeric value fo Rating");
					Form.mediaRating.focus();
					return false;
				}
						
				if (Form.mediaFullDesc.value == "")
				{	
					alert("Please Enter Detailed Description");
					
					return false;
				}	
				var desc = Form.mediaFullDesc.value;		
					
				for(var i=0;i<desc.length;i++)
				{			
						if((desc.charCodeAt(i))==8220)
						{
						desc = desc.replace(desc.charAt(i),"\"");
						}
						if((desc.charCodeAt(i))==8221)
						{
						desc = desc.replace(desc.charAt(i),"\"");
						}
						if((desc.charCodeAt(i))==8216)
						{
						desc = desc.replace(desc.charAt(i),"'");
						}
						if((desc.charCodeAt(i))==8217)
						{
						desc = desc.replace(desc.charAt(i),"'");
						}
				}
				Form.mediaFullDesc.value = desc;
}

function Validator_MusicReview(Form){ 

	
		    if (Form.musicName.value == "")
				{	
					alert("Please Enter Music Name");
					Form.musicName.focus();
					return false;
				}
				if (Form.musicShortDesc.value == "")
				{	
					alert("Please Enter Short Description");
					Form.musicShortDesc.focus();
					return false;
				}
				if(Form.method.value == "add")
				{	
				if (Form.musicImage.value == "")
				{	
					alert("Please select the Image");
					Form.musicImage.focus();
					return false;
				}	
				}
				if (Form.musicAuthor.value == "")
				{	
					alert("Please Enter Reviewer");
					Form.musicAuthor.focus();
					return false;
				}	
				if (Form.musicLanguage.value == "")
				{	
					alert("Please Enter Language");
					Form.musicLanguage.focus();
					return false;
				}	
				if (Form.musicRating.value == "0" || Form.musicRating.value == "0.0")
				{	
					alert("Please Enter Rating");
					Form.musicRating.focus();
					return false;
				}
				if(isIntegerEdit(Form.musicRating.value) == false)
				{
					alert("Please Enter Numeric Value for Rating");
					Form.musicRating.focus();
					return false;
				}
				if (Form.musicFullDesc.value == "")
				{	
					alert("Please Enter Detailed Description");
					
					return false;
				}	
				var desc = Form.musicFullDesc.value;		
					
				for(var i=0;i<desc.length;i++)
				{			
						if((desc.charCodeAt(i))==8220)
						{
						desc = desc.replace(desc.charAt(i),"\"");
						}
						if((desc.charCodeAt(i))==8221)
						{
						desc = desc.replace(desc.charAt(i),"\"");
						}
						if((desc.charCodeAt(i))==8216)
						{
						desc = desc.replace(desc.charAt(i),"'");
						}
						if((desc.charCodeAt(i))==8217)
						{
						desc = desc.replace(desc.charAt(i),"'");
						}
				}
				Form.musicFullDesc.value = desc;	
}
function Validator_MovieReview(Form){ 

	
	    if (Form.movieReviewId.value == "")
			{	
				alert("Please select Movie Name");
				Form.movieReviewId.focus();
				return false;
			}
			if (Form.movieShortDesc.value == "")
			{	
				alert("Please Enter Short Description");
				Form.movieShortDesc.focus();
				return false;
			}
			if(Form.method.value == "add")
	{	
			if (Form.movieImage.value == "")
			{	
				alert("Please select the Image");
				Form.movieImage.focus();
				return false;
			}
			}	
			if (Form.movieAuthor.value == "")
			{	
				alert("Please Enter Reviewer");
				Form.movieAuthor.focus();
				return false;
			}	
			if (Form.movieLanguage.value == "")
			{	
				alert("Please Enter Language");
				Form.movieLanguage.focus();
				return false;
			}	
			if (Form.movieRating.value == "0" || Form.movieRating.value == "0.0")
			{	
				alert("Please Enter Rating");
				Form.movieRating.focus();
				return false;
			}	
			
			if(isIntegerEdit(Form.movieRating.value) == false)
			{
				alert("Please Enter Numeric Value for Rating");
				Form.movieRating.focus();
				return false;
			}
			
			if (Form.movieFullDesc.value == "")
			{	
				alert("Please Enter Detailed Description");
				
				return false;
			}
			
			var desc = Form.movieFullDesc.value;		
				
			for(var i=0;i<desc.length;i++)
			{			
					if((desc.charCodeAt(i))==8220)
					{
					desc = desc.replace(desc.charAt(i),"\"");
					}
					if((desc.charCodeAt(i))==8221)
					{
					desc = desc.replace(desc.charAt(i),"\"");
					}
					if((desc.charCodeAt(i))==8216)
					{
					desc = desc.replace(desc.charAt(i),"'");
					}
					if((desc.charCodeAt(i))==8217)
					{
					desc = desc.replace(desc.charAt(i),"'");
					}
			}
			Form.movieFullDesc.value = desc;
				
	
}


function Validator_CurrentReview(Form){ 

			    if (Form.currentName.value == "")
				{	
					alert("Please Enter Current Issue Name");
					Form.currentName.focus();
					return false;
				}
				if (Form.currentShortDesc.value == "")
				{	
					alert("Please Enter Short Description");
					Form.currentShortDesc.focus();
					return false;
				}	
				if(Form.method.value == "add")
				{
				
				if (Form.currentImage.value == "")
				{	
					alert("Please select the Image");
					Form.currentImage.focus();
					return false;
				}
				}	
				if (Form.currentAuthor.value == "")
				{	
					alert("Please Enter Reviewer");
					Form.currentAuthor.focus();
					return false;
				}	
				if (Form.currentLanguage.value == "")
				{	
					alert("Please Enter Language");
					Form.currentLanguage.focus();
					return false;
				}	
				if (Form.currentRating.value == "0" || Form.currentRating.value == "0.0")
				{	
					alert("Please Enter Rating");
					Form.currentRating.focus();
					return false;
				}
				if (isIntegerEdit(Form.currentRating.value) == false)
				{	
					alert("Please Enter Numeric value for Rating");
					Form.currentRating.focus();
					return false;
				}
				if (Form.currentFullDesc.value == "")
				{	
					alert("Please Enter Detailed Description");
					
					return false;
				}	
				var desc = Form.currentFullDesc.value;		
					
					for(var i=0;i<desc.length;i++)
					{			
						if((desc.charCodeAt(i))==8220)
						{
						desc = desc.replace(desc.charAt(i),"\"");
						}
						if((desc.charCodeAt(i))==8221)
						{
						desc = desc.replace(desc.charAt(i),"\"");
						}
						if((desc.charCodeAt(i))==8216)
						{
						desc = desc.replace(desc.charAt(i),"'");
						}
						if((desc.charCodeAt(i))==8217)
						{
						desc = desc.replace(desc.charAt(i),"'");
						}
					}
					Form.currentFullDesc.value = desc;
}
function Validator_AddTurnPortal(Form){  

        if (Form.status.value == "")
		{	
			alert("Please Enter The Status");
			Form.status.focus();
			return false;
		}
		if (Form.offlineDisplay.value == "")
		{	
			alert("Please Enter OffLine display");
			
			return false;
		}
		
			var desc = Form.offlineDisplay.value;
			for(var i=0;i<desc.length;i++)
			{			
				if((desc.charCodeAt(i))==8220)
				{
				desc = desc.replace(desc.charAt(i),"\"");
				}
				if((desc.charCodeAt(i))==8221)
				{
				desc = desc.replace(desc.charAt(i),"\"");
				}
				if((desc.charCodeAt(i))==8216)
				{
				desc = desc.replace(desc.charAt(i),"'");
				}
				if((desc.charCodeAt(i))==8217)
				{
				desc = desc.replace(desc.charAt(i),"'");
				}
			}
		Form.offlineDisplay.value = desc;
		
}

function Validator_AddWeeksTopic(Form){   
        if (Form.topicName.value == "")
		{	
			alert("Please Enter The topic Name");
			Form.topicName.focus();
			return false;
		}
		if(Form.method.value == "add")
		{
			if (Form.image.value == "")
			{	
				alert("Please Select the Image");
				Form.image.focus();
				return false;
			}
		}
		if (Form.description.value == "")
		{	
			alert("Please Enter the Description");
			
			return false;
		}
		
			var desc = Form.description.value;		
			
			for(var i=0;i<desc.length;i++)
			{			
				if((desc.charCodeAt(i))==8220)
				{
				desc = desc.replace(desc.charAt(i),"\"");
				}
				if((desc.charCodeAt(i))==8221)
				{
				desc = desc.replace(desc.charAt(i),"\"");
				}
				if((desc.charCodeAt(i))==8216)
				{
				desc = desc.replace(desc.charAt(i),"'");
				}
				if((desc.charCodeAt(i))==8217)
				{
				desc = desc.replace(desc.charAt(i),"'");
				}
			}
			Form.description.value = desc;
}

function Validator_CreateMail(Form){ 

	if (Form.mailSubject.value == "")
	{	
		alert("Please Enter the Subject");
		Form.mailSubject.focus();
		return false;
	}		
	if (Form.mailContent.value == "")
	{	
		alert("Please Enter the Content");
		
		return false;
	}
	
		var desc = Form.mailContent.value;		
			
			for(var i=0;i<desc.length;i++)
			{			
				if((desc.charCodeAt(i))==8220)
				{
				desc = desc.replace(desc.charAt(i),"\"");
				}
				if((desc.charCodeAt(i))==8221)
				{
				desc = desc.replace(desc.charAt(i),"\"");
				}
				if((desc.charCodeAt(i))==8216)
				{
				desc = desc.replace(desc.charAt(i),"'");
				}
				if((desc.charCodeAt(i))==8217)
				{
				desc = desc.replace(desc.charAt(i),"'");
				}
			}
			Form.mailContent.value = desc;
		

    var flag = true;
    var edit = false;
    var remove = false; 
    for(var i=0;i<Form.length;i++) {
    	if(Form.elements[i].type == "checkbox" && Form.elements[i].checked) {
    		flag = true;
    		break;
    	} else {
    		flag = false;
    	}
    }
    if(flag == false) {
  			alert("Please select the Groups to send the Mail");
  			return false;       
    }
    
    
}




function Validator_AddModuleOffline(Form){
 
    		if(Form.party.checked)
    		{
    			if(Form.partyOffline.value == "")
    			{
    				alert("Please Enter Party Offline Message");
    				return false;
    			}
    			
    				var desc = Form.partyOffline.value;
					for(var i=0;i<desc.length;i++)
					{			
						if((desc.charCodeAt(i))==8220)
						{
						desc = desc.replace(desc.charAt(i),"\"");
						}
						if((desc.charCodeAt(i))==8221)
						{
						desc = desc.replace(desc.charAt(i),"\"");
						}
						if((desc.charCodeAt(i))==8216)
						{
						desc = desc.replace(desc.charAt(i),"'");
						}
						if((desc.charCodeAt(i))==8217)
						{
						desc = desc.replace(desc.charAt(i),"'");
						}
					}
					Form.partyOffline.value = desc;
    			
    		}
    		if(Form.movie.checked)
    		{
    			if(Form.movieOffline.value == "")
    			{
    				alert("Please Enter Movie Offline Message");
    				return false;
    			}
    				var desc = Form.movieOffline.value;
					for(var i=0;i<desc.length;i++)
					{			
						if((desc.charCodeAt(i))==8220)
						{
						desc = desc.replace(desc.charAt(i),"\"");
						}
						if((desc.charCodeAt(i))==8221)
						{
						desc = desc.replace(desc.charAt(i),"\"");
						}
						if((desc.charCodeAt(i))==8216)
						{
						desc = desc.replace(desc.charAt(i),"'");
						}
						if((desc.charCodeAt(i))==8217)
						{
						desc = desc.replace(desc.charAt(i),"'");
						}
					}
					Form.movieOffline.value = desc;
    		}
    			if(Form.shopping.checked)
    		   {    		
    			if(Form.shoppingOffline.value == "")
    			{
    				alert("Please Enter Shopping Offline Message");
    				return false;
    			}
    			
    				var desc = Form.shoppingOffline.value;
					for(var i=0;i<desc.length;i++)
					{			
						if((desc.charCodeAt(i))==8220)
						{
						desc = desc.replace(desc.charAt(i),"\"");
						}
						if((desc.charCodeAt(i))==8221)
						{
						desc = desc.replace(desc.charAt(i),"\"");
						}
						if((desc.charCodeAt(i))==8216)
						{
						desc = desc.replace(desc.charAt(i),"'");
						}
						if((desc.charCodeAt(i))==8217)
						{
						desc = desc.replace(desc.charAt(i),"'");
						}
					}
					Form.shoppingOffline.value = desc;
    			
    		}
    		if(Form.hotel.checked)
    		{  
    			if(Form.hotelOffline.value == "")
    			{
    				alert("Please Enter Hotel Offline Message");
    				return false;
    			}
    			
    				var desc = Form.hotelOffline.value;
					for(var i=0;i<desc.length;i++)
					{			
						if((desc.charCodeAt(i))==8220)
						{
						desc = desc.replace(desc.charAt(i),"\"");
						}
						if((desc.charCodeAt(i))==8221)
						{
						desc = desc.replace(desc.charAt(i),"\"");
						}
						if((desc.charCodeAt(i))==8216)
						{
						desc = desc.replace(desc.charAt(i),"'");
						}
						if((desc.charCodeAt(i))==8217)
						{
						desc = desc.replace(desc.charAt(i),"'");
						}
					}
					Form.hotelOffline.value = desc;
    				
    		}
    		if(Form.holiday.checked)
    		   { 
    			if(Form.holidayOffline.value == "")
    			{
    				alert("Please Enter Holiday Offline Message");
    				return false;
    			}
    			
    				var desc = Form.holidayOffline.value;
					for(var i=0;i<desc.length;i++)
					{			
						if((desc.charCodeAt(i))==8220)
						{
						desc = desc.replace(desc.charAt(i),"\"");
						}
						if((desc.charCodeAt(i))==8221)
						{
						desc = desc.replace(desc.charAt(i),"\"");
						}
						if((desc.charCodeAt(i))==8216)
						{
						desc = desc.replace(desc.charAt(i),"'");
						}
						if((desc.charCodeAt(i))==8217)
						{
						desc = desc.replace(desc.charAt(i),"'");
						}
					}
					Form.holidayOffline.value = desc;
    			
    		}
    		if(Form.cab.checked)
    		   { 
    			if(Form.cabOffline.value == "")
    			{
    				alert("Please Enter Cab Offline Message");
    				return false;
    			}
    		
    				var desc = Form.cabOffline.value;
					for(var i=0;i<desc.length;i++)
					{			
						if((desc.charCodeAt(i))==8220)
						{
						desc = desc.replace(desc.charAt(i),"\"");
						}
						if((desc.charCodeAt(i))==8221)
						{
						desc = desc.replace(desc.charAt(i),"\"");
						}
						if((desc.charCodeAt(i))==8216)
						{
						desc = desc.replace(desc.charAt(i),"'");
						}
						if((desc.charCodeAt(i))==8217)
						{
						desc = desc.replace(desc.charAt(i),"'");
						}
					}
					Form.cabOffline.value = desc;
    			}
    		
    	}
function Validator_AddBookMarks(Form){   
        
		if (Form.siteName.value == "")
		{	
			alert("Please Enter the Site Name");
			Form.siteName.focus();
			return false;
		}
		if (Form.url.value == "")
				{	
					alert("Please Enter the url");
					Form.url.focus();
					return false;
		}
}


function Validator_Activation(Form){   
        if (Form.userName.value == "")
		{	
			alert("Please Enter User Name");
			Form.userName.focus();
			return false;
		}
		if(_vEmail(Form.userName.value) == false){
			return false;
		}
		if (Form.confirmCode.value == "")
		{	
			alert("Please Enter Confirmation Code");
			Form.confirmCode.focus();
			return false;
		}
		
		
}
function Validator_AddCity(Form)
{    
		if (Form.cityName.value == "")
		{	
			alert("Please Enter City Name");
			Form.cityName.focus();
			return false;
		}
		if (Form.cityCode.value == "")
		{	
			alert("Please Enter City Code");
			Form.cityCode.focus();
			return false;
		}
	return true;
}

function Validator_AddCityArea(Form)
{
		if (Form.cityId.value == "")
		{	
			alert("Please Select City Name");
			Form.cityId.focus();
			return false;
		}    
		if (Form.cityAreaName.value == "")
		{	
			alert("Please Enter City Area Name");
			Form.cityAreaName.focus();
			return false;
		}
		
	return true;
}
function Validator_AddHotel(Form)
{    
		if (Form.cityId.value == "")
		{	
			alert("Please Select City Name");
			Form.cityId.focus();
			return false;
		}
		if (Form.hotelName.value == "")
		{	
			alert("Please Enter Hotel Name");
			Form.hotelName.focus();
			return false;
		}
		
		if (Form.ownerName.value == "")
		{	
			alert("Please Enter Owner Name");
			Form.ownerName.focus();
			return false;
		}
		if (Form.emailId.value == "")
		{	
			alert("Please Enter Email Id ");
			Form.emailId.focus();
			return false;
		}
		if(_vEmail(Form.emailId.value) == false){
			return false;
		}
		return true;
}
function Validator_AddCabCategory(Form)
{    
		
				if (Form.cabType.value == "")
				{	
					alert("Please Enter Cab Name");
					Form.cabType.focus();
					return false;
				}
				if (Form.cabCategory.value == "0")
				{	
					alert("Please Select Cab Type");
					Form.cabCategory.focus();
					return false;
				}
				if(Form.method.value == "add")
				{
					if (Form.cabImage.value == "")
					{	
						alert("Please Select Cab Image");
						Form.cabImage.focus();
						return false;
					}
				}
				if (Form.cabDesc.value == "")
				{	
					alert("Please Enter Detailed Description");
					//Form.cabDesc.focus();
					return false;
				}
				var desc = Form.cabDesc.value;		
				
				for(var i=0;i<desc.length;i++)
				{			
					if((desc.charCodeAt(i))==8220)
					{
					desc = desc.replace(desc.charAt(i),"\"");
					}
					if((desc.charCodeAt(i))==8221)
					{
					desc = desc.replace(desc.charAt(i),"\"");
					}
					if((desc.charCodeAt(i))==8216)
					{
					desc = desc.replace(desc.charAt(i),"'");
					}
					if((desc.charCodeAt(i))==8217)
					{
					desc = desc.replace(desc.charAt(i),"'");
					}
				}
				Form.cabDesc.value = desc;
		
	return true;
}
function Validator_AddFaq(Form){   
        if (Form.faqQuestion.value == "")
		{	
			alert("Please Enter The Question");
			Form.faqQuestion.focus();
			return false;
		}
		if (Form.faqAnswer.value == "")
		{	
			alert("Please Enter the Answer");
			//Form.faqAnswer.focus();
			return false;
		}
		
		var desc = Form.faqAnswer.value;		
		
		for(var i=0;i<desc.length;i++)
		{			
			if((desc.charCodeAt(i))==8220)
			{
			desc = desc.replace(desc.charAt(i),"\"");
			}
			if((desc.charCodeAt(i))==8221)
			{
			desc = desc.replace(desc.charAt(i),"\"");
			}
			if((desc.charCodeAt(i))==8216)
			{
			desc = desc.replace(desc.charAt(i),"'");
			}
			if((desc.charCodeAt(i))==8217)
			{
			desc = desc.replace(desc.charAt(i),"'");
			}
		}
		Form.faqAnswer.value = desc;
}


function Validator_AddMovie(Form)
{    
		if (Form.movieName.value == "")
		{	
			alert("Please Enter Movie Name ");
			Form.movieName.focus();
			return false;
		}
	return true;
}



function Validator_AddTheatre(Form)
{    
		if (Form.thetreName.value == "")
		{	
			alert("Please Enter Theatre Name");
			Form.thetreName.focus();
			return false;
		}
		if (Form.address.value == "")
		{	
			alert("Please Enter Theatre Address");
			Form.address.focus();
			return false;
		}
		if (Form.emailId.value == "")
		{	
			alert("Please Enter Email Id");
			Form.emailId.focus();
			return false;
		}
		if(_vEmail(Form.emailId.value) == false){
			return false;
		}
		if (Form.cityId.value == "")
		{	
			alert("Please Enter Location ");
			Form.cityId.focus();
			return false;
		}
		
		return true;
		
}

function Validator_AddTravelLocation(Form)
{    
		if (Form.travelLocation.value == "")
		{	
			alert("Please Enter Travel Location ");
			Form.travelLocation.focus();
			return false;
		}
	return true;
}





   
        
			
		











































function Validator_AddPackage(Form)
{    
		if (Form.packageName.value == "")
		{	
			alert("Please Enter Package Name ");
			Form.packageName.focus();
			return false;
		}
	return true;
}

function Validator_AddZone(Form)
{    
		if (Form.zoneName.value == "")
		{	
			alert("Please Enter Zone Name ");
			Form.zoneName.focus();
			return false;
		}
	return true;
}
function Validator_AddPartyLocation(Form)
{    
		if (Form.partyLocation.value == "")
		{	
			alert("Please Enter Party Location ");
			Form.partyLocation.focus();
			return false;
		}
	return true;
}

function Validator_AddPartyProduct(Form)
{    
		if (Form.partyProduct.value == "")
		{	
			alert("Please Enter Party Product Name");
			Form.partyProduct.focus();
			return false;
		}
	return true;
}

function Validator_Advertises(Form)
{  
		if (Form.advertiseName.value == "")
		{	
			alert("Please Enter Advertise Name");
			Form.advertiseName.focus();
			return false;
		}
		
		if (Form.cityId.value == 99999)
		{	
			alert("Please Select city Name");
			Form.cityId.focus();
			return false;
		}
		if (Form.advertisePosition.value == "")
		{	
			alert("Please Select advertise Position");
			Form.advertisePosition.focus();
			return false;
		}
		
		return true;
}



function Validator_AddMember(Form){   
        
        if(Form.screenName.value == "")
        {
        	alert("Please Enter Name");
			Form.screenName.focus();
			return false;
        }
		if (Form.emailId.value == "")
		{	
			alert("Please Enter Email Id");
			Form.emailId.focus();
			return false;
		}
		if(_vEmail(Form.emailId.value) == false){
			return false;
		}
		if (Form.confirmEmailId.value == "")
		{	
			alert("Please Enter Confirm Email Id");
			Form.confirmEmailId.focus();
			return false;
		}
		if(_vEmail(Form.confirmEmailId.value) == false){
			return false;
		}
		
		var email = Form.emailId.value;
		var confirmemail = Form.confirmEmailId.value;
		
		if(email != confirmemail)
		{
			alert("Email Id and Confirm Email Id do not Match");
			Form.confirmEmailId.focus();
			return false;
		}
		
		if (Form.password.value == "")
		{	
			alert("Please Enter The Password");
			Form.password.focus();
			return false;
		}
		if (Form.confirmPassword.value == "")
		{	
			alert("Please Enter Confirm Password");
			Form.confirmPassword.focus();
			return false;
		}
		
		var pass = Form.password.value;
		var confirmPass = Form.confirmPassword.value;
		
		if(pass != confirmPass)
		{
			alert("Password and Confirm Password do not match");
			Form.confirmPassword.focus();
			return false;
		}
		
		if(Form.terms.checked == false) {		
			
			alert("Please Select Terms And Conditions");
			return false;
		}
		
}

function Validator_EditMember(Form){   
        
        if(Form.screenName.value == "")
        {
        	alert("Please Enter Screen Name");
			Form.screenName.focus();
			return false;
        }
		
		if (Form.password.value == "")
		{	
			alert("Please Enter The Password");
			Form.password.focus();
			return false;
		}
		if (Form.confirmPassword.value == "")
		{	
			alert("Please Enter Confirm Password");
			Form.confirmPassword.focus();
			return false;
		}
		
		var pass = Form.password.value;
		var confirmPass = Form.confirmPassword.value;
		
		if(pass != confirmPass)
		{
			alert("Password and Confirm Password do not match");
			Form.confirmPassword.focus();
			return false;
		}
		
}

function Validator_AddUserGroup(Form){   
         
		if (Form.userGroupName.value == "")
		{	
			alert("Please Enter The Group Name");
			Form.userGroupName.focus();
			return false;
		}
		
}

function Validator_AddMainCategory(Form){   
        if (Form.mainCatName.value == "")
		{	
			alert("Please Enter The Category Name");
			Form.mainCatName.focus();
			return false;
		}
		
}

function Validator_AddMiniCategory(Form){   
        if (Form.miniCatName.value == "")
		{	
			alert("Please Enter The Category Name");
			Form.miniCatName.focus();
			return false;
		}
		if (Form.mainCatId.value == "")
		{	
			alert("Please Select The Category Name");
			Form.mainCatId.focus();
			return false;
		}
		
}

function Validator_AddMicroCategory(Form){   
		if (Form.mainCatId.value == "")
		{	
			alert("Please Select The Category Name");
			Form.mainCatId.focus();
			return false;
		}
        if (Form.microCatName.value == "")
		{	
			alert("Please Enter The Category Name");
			Form.microCatName.focus();
			return false;
		}
		if (Form.url.value == "")
		{	
			alert("Please Enter The Url");
			Form.url.focus();
			return false;
		}
		
}

function Validator_AddBadWords(Form){   
         
		if (Form.badWord.value == "")
		{	
			alert("Please Enter The Bad Word");
			Form.badWord.focus();
			return false;
		}
}

function Validator_AddPolling(Form){   
         
		if (Form.pollQuestion.value == "")
		{	
			alert("Please Enter Polling Question");
			Form.pollQuestion.focus();
			return false;
		}
		if (Form.option1.value == "")
		{	
			alert("Please Enter Option1");
			Form.option1.focus();
			return false;
		}
		if (Form.option2.value == "")
		{	
			alert("Please Enter Minimum 2 options");
			Form.option2.focus();
			return false;
		}
		
}


function Validator_AddProductMainCategory(Form){   
        if (Form.productMainCatName.value == "")
		{	
			alert("Please Enter The Product Category Name");
			Form.productMainCatName.focus();
			return false;
		}
}

function Validator_AddProductMiniCategory(Form){  

        if (Form.productMiniCatName.value == "")
		{	
			alert("Please Enter The Mini Category Name");
			Form.productMiniCatName.focus();
			return false;
		}
		if (Form.productMainCatId.value == "")
		{	
			alert("Please Select The Main Category Name");
			Form.productMainCatId.focus();
			return false;
		}
}

function Validator_AddProductMicroCategory(Form){   
        if (Form.productMicroCatName.value == "")
		{	
			alert("Please Enter The Micro Category Name");
			Form.productMicroCatName.focus();
			return false;
		}
		if (Form.productMiniCatId.value == "")
		{	
			alert("Please Select The Mini Category Name");
			Form.productMiniCatId.focus();
			return false;
		}
}

function Validator_AddProduct(Form){ alert("==");  
        
        if (Form.pmainId.value == "")
		{	
			alert("Please Select Main Category Name");
			Form.pmainId.focus();
			return false;
		}
		if (Form.pminiId.value == "")
		{	
			alert("Please Select Mini Category Name");
			Form.pminiId.focus();
			return false;
		}
		if (Form.pmicroId.value == "")
		{	
			alert("Please Select Micro Category Name");
			Form.pmicroId.focus();
			return false;
		}
        
        if (Form.productId.value == "")
		{	
			alert("Please Enter The Product Id");
			Form.productId.focus();
			return false;
		}
		        
		if (Form.productName.value == "")
		{	
			alert("Please Enter the Product Name");
			Form.productName.focus();
			return false;
		}
		if (Form.productLocation.value == "")
		{	
			alert("Please Enter the Product Location");
			Form.productLocation.focus();
			return false;
		}
		if (Form.productSupplier.value == "")
		{	
			alert("Please Enter the Product Supplier");
			Form.productSupplier.focus();
			return false;
		}
		if (Form.serviceProvider.value == "")
		{	
			alert("Please Enter Service Provider");
			Form.serviceProvider.focus();
			return false;
		}
		
		if (Form.serviceProviderEmailIds.value == "")
		{	
			alert("Please Enter Service Provider EmailIds");
			Form.serviceProviderEmailIds.focus();
			return false;
		}
		if(_vEmail(Form.serviceProviderEmailIds.value) == false){
			return false;
		}
		if (Form.shippingLocation.value == "")
		{	
			alert("Please Enter the Shipping Location");
			Form.shippingLocation.focus();
			return false;
		}
		
		if (Form.deliverTime.value == "")
		{	
			alert("Please Enter the Delivery Time");
			Form.deliverTime.focus();
			return false;
		}
		if (Form.productCost.value == "")
		{	
			alert("Please Enter the Product Cost");
			Form.productCost.focus();
			return false;
		}
		if (Form.shippingCost.value == "")
		{	
			alert("Please Enter the Shipping Cost");
			Form.shippingCost.focus();
			return false;
		}
		if (Form.processFee.value == "")
		{	
			alert("Please Enter the Processing Fee");
			Form.processFee.focus();
			return false;
		}
		
		if (Form.productDisc.value == "")
		{	
			alert("Please Enter the Product Description");
			
			return false;
		}
		
		var desc = Form.productDisc.value;
		for(var i=0;i<desc.length;i++)
		{			
			if((desc.charCodeAt(i))==8220)
			{
			desc = desc.replace(desc.charAt(i),"\"");
			}
			if((desc.charCodeAt(i))==8221)
			{
			desc = desc.replace(desc.charAt(i),"\"");
			}
			if((desc.charCodeAt(i))==8216)
			{
			desc = desc.replace(desc.charAt(i),"'");
			}
			if((desc.charCodeAt(i))==8217)
			{
			desc = desc.replace(desc.charAt(i),"'");
			}
		}
		Form.productDisc.value = desc;
}

function Validator_AddTurnPortal(Form){  

        if (Form.status.value == "")
		{	
			alert("Please Enter The Status");
			Form.status.focus();
			return false;
		}
		if (Form.offlineDisplay.value == "")
		{	
			alert("Please Enter OffLine display");
			Form.offlineDisplay.focus();
			return false;
		}
		
}



function Validator_AddWebLinks(Form){   
        if (Form.fileName.value == "")
		{	
			alert("Please Enter The File Name");
			Form.fileName.focus();
			return false;
		}
		if (Form.link.value == "")
		{	
			alert("Please Enter the Link");
			Form.link.focus();
			return false;
		}
}



function Validator_AddWebDirectory(Form){   
        if (Form.mainCatId.value == "")
		{	
			alert("Please Select Main Category");
			Form.mainCatId.focus();
			return false;
		}
		if (Form.miniCatId.value == "")
		{	
			alert("Please Select Mini Category");
			Form.miniCatId.focus();
			return false;
		}
		if (Form.microCatId.value == "")
		{	
			alert("Please Select Micro Category");
			Form.microCatId.focus();
			return false;
		}
}

function Validator_MemberLogin(Form){   
        if (Form.userName.value == "")
		{	
			alert("Please Enter User Name");
			Form.userName.focus();
			return false;
		}
		if (Form.password.value == "")
		{	
			alert("Please Enter Password");
			Form.passsword.focus();
			return false;
		}
		
		
}




function Validator_MemberLogin1(Form){   
        if (Form.userName.value == "")
		{	
			alert("Please Enter User Name");
			Form.userName.focus();
			return false;
		}
		if (Form.password.value == "")
		{	
			alert("Please Enter Password");
			Form.passsword.focus();
			return false;
		}
		document.memberLoginForm.setAttribute("action","MemberLogin.do");
}

function Validator_ForgotPassword(Form){ 
       if (Form.userName.value == "")
		{	
			alert("Please Enter Email Id");
			Form.userName.focus();
			return false;
		}
		if(_vEmail(Form.userName.value) == false){
			return false;
		}
}


function Validator_Compose(Form){ 

	    if (Form.mailTo.value == "")
		{	
			alert("Please Enter To address");
			Form.mailTo.focus();
			return false;
		}
		if(_vEmail(Form.mailTo.value) == false){
			return false;
		}
		if (Form.mailSubject.value == "")
		{	
			alert("Please Enter Subject");
			Form.mailSubject.focus();
			return false;
		}
		
}

function Validator_DeleteMails(Form){ 

    var flag = true;
    var edit = false;
    var remove = false; 
    for(var i=0;i<Form.length;i++) {
    	if(Form.elements[i].type == "checkbox" && Form.elements[i].checked) {
    		flag = true;
    		break;
    	} else {
    		flag = false;
    	}
    }
    if(flag == false) {
  			alert("Please select the mail to be Deleted");
  			return false;       
    }
}

function Validator_GetMember(Form){ 

    if (Form.emailId.value == "")
		{	
			alert("Please Enter Email Id");
			Form.emailId.focus();
			return false;
		}
}


function Validator_ChangePassword(Form){ 

		if (Form.newPassword.value == "")
		{	
			alert("Please Enter new Password");
			Form.newPassword.focus();
			return false;
		}
		if (Form.confirmPassword.value == "")
		{	
			alert("Please Enter Confirm Password");
			Form.confirmPassword.focus();
			return false;
		}
		var newpass= Form.newPassword.value;
		var confirmpass = Form.confirmPassword.value;
		if(newpass != confirmpass)
		{
			alert("New Password and Confirm Password do not Match");
			Form.confirmPassword.focus();
			return false;
		}
}


function Validator_ChangeMemberPassword(Form){ 

		if (Form.password.value == "")
		{	
			alert("Please Enter old Password");
			Form.password.focus();
			return false;
		}
		if (Form.newPassword.value == "")
		{	
			alert("Please Enter new Password");
			Form.newPassword.focus();
			return false;
		}
		if (Form.confirmPassword.value == "")
		{	
			alert("Please Enter Confirm Password");
			Form.confirmPassword.focus();
			return false;
		}
		var newpass= Form.newPassword.value;
		var confirmpass = Form.confirmPassword.value;
		if(newpass != confirmpass)
		{
			alert("New Password and Confirm Password do not Match");
			Form.confirmPassword.focus();
			return false;
		}
}


function Validator_ChangeAdminPassword(Form){ 

		
		if (Form.password.value == "")
		{	
			alert("Please Enter old Password");
			Form.password.focus();
			return false;
		}
		if (Form.newPassword.value == "")
		{	
			alert("Please Enter new Password");
			Form.newPassword.focus();
			return false;
		}
		if (Form.confirmPassword.value == "")
		{	
			alert("Please Enter Confirm Password");
			Form.confirmPassword.focus();
			return false;
		}
		var newpass= Form.newPassword.value;
		var confirmpass = Form.confirmPassword.value;
		if(newpass != confirmpass)
		{
			alert("New Password and Confirm Password do not Match");
			Form.confirmPassword.focus();
			return false;
		}
}






function Validator_HolidayPackage(Form){ 
	
    if (Form.holidayPkgTypeId.value == "")
		{	
			alert("Please Enter Package Type");
			Form.holidayPkgTypeId.focus();
			return false;
		}		
    	if (Form.holidayPkgName.value == "")
		{	
			alert("Please Enter Holiday Package Name");
			Form.holidayPkgName.focus();
			return false;
		}
		if (Form.duration.value == "")
		{	
			alert("Please Enter Duration");
			Form.duration.focus();
			return false;
		}
		if (Form.nightStay.value == "")
		{	
			alert("Please Enter Night Stays");
			Form.nightStay.focus();
			return false;
		}
		if (Form.itinerary.value == "")
		{	
			alert("Please Enter Itinerary");
			Form.itinerary.focus();
			return false;
		}
		
		var desc = Form.description.value;
		
		if(desc.length>=50000){
			alert("Description Is Too Long");
			
			return false;
		
		}
		if (Form.processingFee.value == "")
		{	
			alert("Please Enter Processing Fee");
			Form.processingFee.focus();
			return false;
		}
		if (Form.tax.value == "")
		{	
			alert("Please Enter Tax");
			Form.tax.focus();
			return false;
		}
		var flag=false;
		var len = Form.flat.length;		
		for(var i=0;i<len;i++)
		{
			
			if(Form.flat[i].checked)
				flag=true;
		}		
		if(flag == false)
		{
			alert("Please Select Processing Type");
			Form.processingFee.focus();
			return false;
		}
		if (Form.serviceProviderName.value == "")
		{	
			alert("Please Enter Service Provider Name");
			Form.serviceProviderName.focus();
			return false;
		}
		if (Form.serviceProviderContactNo.value == "")
		{	
			alert("Please Enter Service Provider Contact No");
			Form.serviceProviderContactNo.focus();
			return false;
		}
		if (Form.serviceProviderEmailIds.value == "")
		{	
			alert("Please Enter Service Provider Email Ids");
			Form.serviceProviderEmailIds.focus();
			return false;
		}
		if(_vEmail(Form.serviceProviderEmailIds.value) == false){
			Form.serviceProviderEmailIds.focus();
			return false;
		}
		
		if((Form.standard2Pax.value == "" && Form.standard4Pax.value == "" && Form.standard6Pax.value == "" && Form.deluxe2Pax.value == "" && Form.deluxe4Pax.value == "" && Form.deluxe6Pax.value == "" && Form.luxury2Pax.value == "" && Form.luxury4Pax.value == "" && Form.luxury6Pax.value == "") || (Form.standard2Pax.value == 0 && Form.standard4Pax.value == 0 && Form.standard6Pax.value == 0 && Form.deluxe2Pax.value == 0 && Form.deluxe4Pax.value == 0 && Form.deluxe6Pax.value == 0 && Form.luxury2Pax.value == 0 && Form.luxury4Pax.value == 0 && Form.luxury6Pax.value == 0))
		{	
			alert("Please Enter Any Package Rates.");
			return false;
		}		
		
		for(var i=0;i<desc.length;i++)
		{			
			if((desc.charCodeAt(i))==8220)
			{
			desc = desc.replace(desc.charAt(i),"\"");
			}
			if((desc.charCodeAt(i))==8221)
			{
			desc = desc.replace(desc.charAt(i),"\"");
			}
			if((desc.charCodeAt(i))==8216)
			{
			desc = desc.replace(desc.charAt(i),"'");
			}
			if((desc.charCodeAt(i))==8217)
			{
			desc = desc.replace(desc.charAt(i),"'");
			}
		}
		Form.description.value = desc;
}



function Validator_HotelReservation(Form){ 

    if (Form.roomType.value == "")
		{	
			alert("Please Enter Room Type");
			Form.roomType.focus();
			return false;
		}
		if (Form.roomStatus.value == "")
		{	
			alert("Please Enter Room Status");
			Form.roomStatus.focus();
			return false;
		}
		if (Form.hotelDesc.value == "")
		{	
			alert("Please Enter Description");
			
			return false;
		}
		if (Form.hotelTerms.value == "")
		{	
			alert("Please Enter Terms and Conditions");
			Form.hotelTerms.focus();
			return false;
		}
		if (Form.hotelCost.value == "")
		{	
			alert("Please Enter Cost");
			Form.hotelCost.focus();
			return false;
		}
		if (Form.processingFee.value == "")
		{	
			alert("Please Enter Processing Fee");
			Form.processingFee.focus();
			return false;
		}
		
}

function Validator_CabBooking(Form){ 

    	if (Form.serviceProvider.value == "")
		{	
			alert("Please Enter Service Provider Name");
			Form.serviceProvider.focus();
			return false;
		}
		if (Form.serviceEmailId.value == "")
		{	
			alert("Please Enter Service Provider EmailId");
			Form.serviceEmailId.focus();
			return false;
		}
		if (_vEmail(Form.serviceEmailId.value) == false)
		{	
			Form.serviceEmailId.focus();
			return false;
		}
		if (Form.serviceContact.value == "")
		{	
			alert("Please Enter Service Provider Contact Number");
			Form.serviceContact.focus();
			return false;
		}
		if (Form.amount.value == 0)
		{	
			alert("Please Enter Amount");
			Form.amount.focus();
			return false;
		}		
		if (Form.expiry.value == 0)
		{	
			alert("Please Enter Expiry");
			Form.expiry.focus();
			return false;
		}
		
		var flag1=false;
		var len1 = Form.expiryType.length;
		
		for(var i=0;i<len1;i++)
		{
			
			if(Form.expiryType[i].checked)
				flag1=true;
		}
		
		if(flag1 == false)
		{
			alert("Please Select Expiry Type");
			Form.expiry.focus();
			return false;
		}
		
		var desc = Form.cabTerms.value;		
		
		for(var i=0;i<desc.length;i++)
		{			
			if((desc.charCodeAt(i))==8220)
			{
			desc = desc.replace(desc.charAt(i),"\"");
			}
			if((desc.charCodeAt(i))==8221)
			{
			desc = desc.replace(desc.charAt(i),"\"");
			}
			if((desc.charCodeAt(i))==8216)
			{
			desc = desc.replace(desc.charAt(i),"'");
			}
			if((desc.charCodeAt(i))==8217)
			{
			desc = desc.replace(desc.charAt(i),"'");
			}
		}
		Form.cabTerms.value = desc;
}



function Validator_PartyOrder(Form){ 

   
		if (Form.partyDesc.value == "")
		{	
			alert("Please Enter Description");
			
			return false;
		}
		if (Form.partyTerms.value == "")
		{	
			alert("Please Enter Terms and Conditions");
			Form.partyTerms.focus();
			return false;
		}
		if (Form.partyCost.value == "")
		{	
			alert("Please Enter Cost");
			Form.partyCost.focus();
			return false;
		}
		if (Form.processingFee.value == "")
		{	
			alert("Please Enter Processing Fee");
			Form.processingFee.focus();
			return false;
		}
		
}

function Validator_EmailSettings(Form){ 

    if (Form.incomingEmail.value == "")
		{	
			alert("Please Enter Incoming Email Address");
			Form.incomingEmail.focus();
			return false;
		}
		if (Form.outgoingEmail.value == "")
		{	
			alert("Please Enter Outgoing Email Address");
			Form.outgoingEmail.focus();
			return false;
		}		
}



function Validator_CabReport(Form){ 

	var current = Form.currentDate.value;
	var cDay = current.substring(8,10);
	
	var from = 	Form.fromDate.value;
	var m1 = from.substring(5,7);
	var to = Form.toDate.value;
	var m2 = to.substring(5,7);
	
	var day1 = from.substring(8,10);
	var day2 = to.substring(8,10);
	
	if(m1 == m2)
	{
		if(day1 > day2)
		{
			alert("To Date is greater than from Date");
			Form.toDate.focus();
			return false;
		}
	}	
	else if(m1 > m2)
	{	
		alert("Invalid Date");
		Form.toDate.focus();
		return false;
	}
}





function Validator_CareerAdmin(Form)
{    
	if (Form.job_title.value == "")
		{	
			alert("Please enter Job Title");
			Form.job_title.focus();
			return false;
		}
	if (Form.job_desc.value == "")
		{	
			alert("Please enter Job Description");
			
			return false;
		}
	var desc = Form.job_desc.value;
		if(desc.length>=50000){
			alert("Description Is Too Long");
			
			return false;
		
		}
		for(var i=0;i<desc.length;i++)
		{			
			if((desc.charCodeAt(i))==8220)
			{
			desc = desc.replace(desc.charAt(i),"\"");
			}
			if((desc.charCodeAt(i))==8221)
			{
			desc = desc.replace(desc.charAt(i),"\"");
			}
			if((desc.charCodeAt(i))==8216)
			{
			desc = desc.replace(desc.charAt(i),"'");
			}
			if((desc.charCodeAt(i))==8217)
			{
			desc = desc.replace(desc.charAt(i),"'");
			}
		}
		Form.job_desc.value = desc;	
	if (Form.hr_mail.value == "")
		{	
			alert("Please enter HR Email-Id");
			Form.hr_mail.focus();
			return false;
		}	
	if(_vEmail(Form.hr_mail.value) == false){
			return false;
		}	
		

return true;
}

function Validator_CareerMember(Form)
{       
		if (Form.drop_down.value == "")
		{	
			alert("Please Select Job Type");
			Form.drop_down.focus();
			return false;
		}
		
		if (Form.ur_name.value == "")
		{	
			alert("Please Enter Your Name");
			Form.ur_name.focus();
			return false;
		}
		
		
			var len=Form.sex.length;
			var flag="false";
			for(var i=0;i<len;i++)
			{
			if(Form.sex[i].checked)
				flag="true";
			}
			if(flag=="false")
			{
			alert("Please Select Gender");
			return false;
			}
		
			
		if (Form.dates.value == "")
		{	
			alert("Please Select Date");
			Form.dates.focus();
			return false;
		}
		if (Form.months.value == "")
		{	
			alert("Please Select Month");
			Form.months.focus();
			return false;
		}
		if (Form.year.value == "")
		{	
			alert("Please Select Year");
			Form.year.focus();
			return false;
		}
		if (Form.desc_urself.value == "")
		{	
			alert("Please Enter ur Description");
			Form.desc_urself.focus();
			return false;
		}
		
		if (Form.ur_mailid.value == "")
		{	
			alert("Please Enter Ur Email-id");
			Form.ur_mailid.focus();
			return false;
		}
	
		if(_vEmail(Form.ur_mailid.value) == false){
			return false;
		}
		if (Form.cv_paste.value == "" && Form.cv_upload.value == "")
		{	
			alert("Please Select Resume or Copy and Paste");
			Form.cv_paste.focus();
			return false;
		}
		if (Form.cv_paste.value != "" && Form.cv_upload.value != "")
		{	
			alert("Please Select Resume or Copy and Paste");
			Form.cv_paste.focus();
			return false;
		}
		return true;
}
function Validator_CareerStatus(Form)
{			
			var len=Form.set_status.length;
			var flag="false";
			var flag2="false";
			var status = "";
			for(var j=0;j<len;j++)
			{
				if(Form.set_status[j].checked){
					flag="true";
					status = Form.set_status[j].value;
				}
			}
			if(status=="off_line")
			{
				if(Form.message.value!="")
				flag2="true";			
			}	
			if(flag=="false")
			{
			alert("Please Select Status");
			return false;
			}
			if(flag2=="false" && status=="off_line")
			{
				alert("Please Enter Message");
				//Form.message.focus();
				return false;
			}
			var desc = Form.message.value;
			if(desc.length>=50000){
				alert("Description Is Too Long");					
				return false;			
			}
			
			for(var i=0;i<desc.length;i++)
		{			
			if((desc.charCodeAt(i))==8220)
			{
			desc = desc.replace(desc.charAt(i),"\"");
			}
			if((desc.charCodeAt(i))==8221)
			{
			desc = desc.replace(desc.charAt(i),"\"");
			}
			if((desc.charCodeAt(i))==8216)
			{
			desc = desc.replace(desc.charAt(i),"'");
			}
			if((desc.charCodeAt(i))==8217)
			{
			desc = desc.replace(desc.charAt(i),"'");
			}
		}
		Form.message.value = desc;	
	
}







var xmlHttp99;
function initRequest99(){
try {
xmlHttp99 = new XMLHttpRequest();
} catch (e) {
try {
xmlHttp99 = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlHttp99 = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
alert("Your browser does not support AJAX!");
return false;
}
}
}
}
var xmlHttp100;
function initRequest100(){
try {
xmlHttp100 = new XMLHttpRequest();
} catch (e) {
try {
xmlHttp100 = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlHttp100 = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
alert("Your browser does not support AJAX!");
return false;
}
}
}
}
function GetDateAndTime(timeZone){
	if(timeZone != ""){
		initRequest99();	
		xmlHttp99.onreadystatechange = processRequestTime;	
		xmlHttp99.open("GET", "../GetServerDateAndTime.do?timeZone="+timeZone,true);
		xmlHttp99.send(null);
	}
}
function GetDateAndTime1(timeZone){
	if(timeZone != ""){
		initRequest99();	
		xmlHttp99.onreadystatechange = processRequestTime;	
		xmlHttp99.open("GET", "GetServerDateAndTime.do?timeZone="+timeZone,true);
		xmlHttp99.send(null);
	}
}
function processRequestTime() {	
if (xmlHttp99.readyState == 4) {	
if (xmlHttp99.status == 200) {
textToSplit = xmlHttp99.responseText;
returnElements = textToSplit.split("&&&");
var date = returnElements[0];
var time = returnElements[1];
document.getElementById("serverDate").innerHTML = date;
document.getElementById("serverTime").innerHTML = time;
}	
}
}

function GetISTDateAndTime(){
	initRequest100();	
	xmlHttp100.onreadystatechange = processRequestTime100;	
	xmlHttp100.open("GET", "../GetISTDateAndTime.do",true);
	xmlHttp100.send(null);	
}
function GetISTDateAndTime1(){
	initRequest100();	
	xmlHttp100.onreadystatechange = processRequestTime100;	
	xmlHttp100.open("GET", "GetISTDateAndTime.do",true);
	xmlHttp100.send(null);	
}
function processRequestTime100() {	
if (xmlHttp100.readyState == 4) {
if (xmlHttp100.status == 200) {
textToSplit = xmlHttp100.responseText;
returnElements = textToSplit.split("&&&");
var date = returnElements[0];
var time = returnElements[1];
document.getElementById("serverDate").innerHTML = date;
document.getElementById("serverTime").innerHTML = time;
}	
}
}

function validateChars(t,v){
var w = "";
for (i=0; i < t.value.length; i++) {
x = t.value.charAt(i);
if (v.indexOf(x,0) != -1)
w += x;
}
t.value = w;
}


var xmlHttpTabber;
function initRequestTabber(){
try {
xmlHttpTabber = new XMLHttpRequest();
} catch (e) {
try {
xmlHttpTabber = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlHttpTabber = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
alert("Your browser does not support AJAX!");
return false;
}
}
}
}
var xmlHttpPolling;
function initRequestPolling(){
try {
xmlHttpPolling = new XMLHttpRequest();
} catch (e) {
try {
xmlHttpPolling = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlHttpPolling = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
alert("Your browser does not support AJAX!");
return false;
}
}
}
}
var xmlHttpPoll;
function initRequestPoll(){
try {
xmlHttpPoll = new XMLHttpRequest();
} catch (e) {
try {
xmlHttpPoll = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlHttpPoll = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
alert("Your browser does not support AJAX!");
return false;
}
}
}
}

var xmlHttpMini;
function initRequestMini(){
try {
xmlHttpMini = new XMLHttpRequest();
} catch (e) {
try {
xmlHttpMini = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlHttpMini = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
alert("Your browser does not support AJAX!");
return false;
}
}
}
}

var xmlHttpMicro;
function initRequestMicro(){
try {
xmlHttpMicro = new XMLHttpRequest();
} catch (e) {
try {
xmlHttpMicro = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlHttpMicro = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
alert("Your browser does not support AJAX!");
return false;
}
}
}
}
function setPolling()
{
document.getElementById('cricketId').style.display = "none";
document.getElementById('pollingId').style.display = "block";
document.getElementById('cricket').style.display = "none";
document.getElementById('polling').style.display = "block";
document.getElementById('poll').style.display = "block";
document.getElementById('result').style.display = "none";
//document.getElementById('show').style.display = "none";
}

function setCricket()
{
document.getElementById('cricketId').style.display = "block";
document.getElementById('cricketId').style.display = "";
document.getElementById('pollingId').style.display = "none";
document.getElementById('cricket').style.display = "block";
document.getElementById('cricket').style.display = "";
document.getElementById('polling').style.display = "none";

}



function getPollingResults(form)
{
var id = document.indexForm.pollId.value;
initRequestPolling();	
xmlHttpPolling.onreadystatechange = processRequestPolling;	
xmlHttpPolling.open("GET", "../GetPollingResults.do?id="+id,true);
xmlHttpPolling.send(null);
}

function processRequestPolling() {	
document.getElementById('poll').style.display = "none";
document.getElementById('result').style.display = "block";
var str="";
var id="";
if (xmlHttpPolling.readyState == 4) {	
if (xmlHttpPolling.status == 200) {

textToSplit = xmlHttpPolling.responseText
returnElements=textToSplit.split("||")
for ( var i=0; i<returnElements.length-1; i++ ){
		valueLabelPair = returnElements[i].split(",")
		document.getElementById("que").innerHTML = valueLabelPair[1];
		
		document.getElementById("opt1").innerHTML = valueLabelPair[2];
		document.getElementById("per1").innerHTML = valueLabelPair[7]+"%";
		
		document.getElementById("opt2").innerHTML = valueLabelPair[3];
		document.getElementById("per2").innerHTML = valueLabelPair[8]+"%";
		
		if(valueLabelPair[4]!= "") 
		{
			//document.getElementById("opt3tr").style.display = "block";
			document.getElementById("opt3").innerHTML = valueLabelPair[4];
			document.getElementById("per3").innerHTML = valueLabelPair[9]+"%";
		}
		
		if(valueLabelPair[5]!= "") 
		{
			//document.getElementById("opt4tr").style.display = "block";
			document.getElementById("opt4").innerHTML = valueLabelPair[5];
			document.getElementById("per4").innerHTML = valueLabelPair[10]+"%";
		}
		
		if(valueLabelPair[6]!= "") 
		{
			//document.getElementById("opt5tr").style.display = "block";
			document.getElementById("opt5").innerHTML = valueLabelPair[6];
			document.getElementById("per5").innerHTML = valueLabelPair[11]+"%";
		}
		
		
}
}	
}
}

function setPollingAction()
{
var id1 = document.indexForm.pollId.value;
var vote1 = "";
var len = document.indexForm.vote.length;
		
		for(var i=0;i<len;i++)
		{			
			if(document.indexForm.vote[i].checked)
			{
				flag=true;
				vote1 = document.indexForm.vote[i].value;
			}	
		}
var dt1 = document.indexForm.voteDate.value;
initRequestPoll();	
xmlHttpPoll.onreadystatechange = processRequestPoll;	
xmlHttpPoll.open("GET", "../InsertPoll.do?id="+id1+"&vote="+vote1+"&dt="+dt1,true);
xmlHttpPoll.send(null);
}

function processRequestPoll() {	
if (xmlHttpPoll.readyState == 4) {	
if (xmlHttpPoll.status == 200) {
textToSplit = xmlHttpPoll.responseText;
alert("Thanks for your valuable vote.");
getPollingResults();
}
}	
}


var miniId = "";
function setMicroCat(obj)
{
miniId = obj;
initRequestMicro();	
xmlHttpMicro.onreadystatechange = processRequestMicro;	
xmlHttpMicro.open("GET", "../GetMicroCat.do?id="+obj,true);
xmlHttpMicro.send(null);
}


function processRequestMicro() {	
if (xmlHttpMicro.readyState == 4) {	
if (xmlHttpMicro.status == 200) {
textToSplit = xmlHttpMicro.responseText
if(textToSplit == ""){
	document.getElementById("micro"+miniId).style.display = "none";
}
returnElements=textToSplit.split("||")
returnMicro = returnElements.length;
var x = document.getElementById("micro"+miniId);
x.innerHTML = "";
for ( var i=0; i<returnElements.length-1; i++ ){		
		valueLabelPair = returnElements[i].split("??")
		var v = valueLabelPair[2] ;
		//valueLabelPair[2] = "http://"+valueLabelPair[2];
		document.bufferform.tableid.value="tabstable";
		//document.bufferform.theurl.value=valueLabelPair[2];
		//document.bufferform.theurltext.value=valueLabelPair[1];
		var win = valueLabelPair[3];
		//if(win == "yes"){
		//	x.innerHTML+="<li><a href='#' onclick=window.open('"+valueLabelPair[2]+"');>"+valueLabelPair[1]+"</a></li>";
		//}
		//else{
		//	x.innerHTML+="<li><a href='#' onclick=checkTabber('"+valueLabelPair[2]+"','"+valueLabelPair[1]+"');>"+valueLabelPair[1]+"</a></li>";			
		//}
		x.innerHTML+="<li><a href='#' onclick=checkWindowStatus('" + valueLabelPair[0] + "','" + valueLabelPair[1] + "','" + valueLabelPair[2] + "','" +valueLabelPair[3]+"');>"+valueLabelPair[1]+"</a></li>";
	}
}	
}
}

function checkTabber(url,url1)
{
document.bufferform.tableid.value="tabstable";
document.bufferform.theurl.value=url;
document.bufferform.theurltext.value=url1;
var mytext = document.windowform.windowValue.value;
if(mytext==""){
	window.open('../tabber.do','','height=150,width=300');	}
	 else if(mytext=="parent"){
	 addtd('tabstable',url,url1);
	 document.windowform.windowValue.value = "";
	 addiframe(url);
	}
	 else if(mytext=="child"){	 
	 	window.open(url.toString());
		document.windowform.windowValue.value = "";	
	 }
	
}


function setDetails(url,url1)
{
	document.bufferform.theurl.value=url;
	document.bufferform.theurltext.value=url1;
	checkTabber(document.bufferform.theurl.value,document.bufferform.theurltext.value);
}


function addtd(tableid,theurl,theurltext){
document.getElementById('tabbersid').style.display="block";	
document.getElementById('loginDisplay').style.display="none";
document.getElementById('framedisplay').style.display="block";
document.getElementById('tabshowdisplay').style.display="block";
var tableid = document.getElementById(tableid);
var tr = tableid.getElementsByTagName("TR")[0];
var td = document.createElement("TD");

td.innerHTML = "<a href="+theurl+" target='tabshow' onclick='checkLink();'>"+theurltext + "</a>&nbsp;&nbsp;&nbsp;<input type='button' value='x' onClick=removetd(this,'tabstable')>"
tr.appendChild(td);
var iframevar = document.getElementById("tabshowdisplay");
iframevar.src =theurl;
}
function checkLink(){
	var login = document.getElementById('loginDisplay').style.display;
	if(login == "block"){
		document.getElementById('loginDisplay').style.display="none";
		document.getElementById('frameDisplay').style.display="block";
		document.getElementById('tabshowdisplay').style.display="block";
	}
}


function removetd(obj,tableid)
{
var tdvar = obj.parentNode;
var tableid = document.getElementById(tableid);
var trvar = tdvar.parentNode;
trvar.removeChild(tdvar);
document.getElementById('loginDisplay').style.display="block";
document.getElementById('framedisplay').style.display="none";
var tableid = document.getElementById('tabstable');
if(tableid.getElementsByTagName("TD").length==0){
	document.getElementById('tabbersid').style.display="none";
}
}

function setSearchAction()
{
	var type= "";
	var srch=document.mySearchForm.search.value;
	alert(srch);
	 for(var i=0;i<document.mySearchForm.length;i++) 
	{
	  	if(document.mySearchForm.elements[i].type == "radio" && document.mySearchForm.elements[i].checked) 
	    {
	    	type = document.mySearchForm.elements[i].value;
	    	flag = true;
		    break;
		} else {
		    flag = false;
		}
	}
	
	if(flag == true)
	{
		if(type == "9thclick")
		{
			document.mySearchForm.setAttribute("action","../Search.do");
			document.mySearchForm.submit();
		}
		if(type == "google")
		{
			window.open('http://www.google.com/search?q='+srch);
		}
	}
	else if(flag == false)
	{
		alert("Please Select Search Type");
	}
}

function setMainCat(id)
{ 
	document.getElementById(id).style.display = "block";
}

function setProductMainCat(id)
{ 
	document.getElementById(id).style.display = "block";
}
function setBookMarks(id)
{ 
	document.getElementById(id).style.display = "block";
}
function setReview(id)
{ 
	document.getElementById(id).style.display = "block";
}




  ///////////////////////////////////////////////////////////////////////
 /////////// 				Pranav Kumar				////////////////
///////////////////////////////////////////////////////////////////////


var tmpId;
var tmpName;
var tmpUrl;
var tmpWin;
var removeObj;
var removeTableId;
var xmlHttp369;
var xmlHttp370;
var xmlHttp371;
var currentId;
var lastTabId;
function initRequest369() {
	try {
		xmlHttp369 = new XMLHttpRequest();
	}
	catch (e) {
		try {
			xmlHttp369 = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
			try {
				xmlHttp369 = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) {
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}
}
function initRequest370() {
	try {
		xmlHttp370 = new XMLHttpRequest();
	}
	catch (e) {
		try {
			xmlHttp370 = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
			try {
				xmlHttp370 = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) {
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}
}
function initRequest371() {
	try {
		xmlHttp371 = new XMLHttpRequest();
	}
	catch (e) {
		try {
			xmlHttp371 = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
			try {
				xmlHttp371 = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) {
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}
}

function initRequest372() {
	try {
		xmlHttp372 = new XMLHttpRequest();
	}
	catch (e) {
		try {
			xmlHttp372 = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
			try {
				xmlHttp372 = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) {
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}
}
/**
	Checks for url format whether it contains 'http://'
	and return the formated url if necessary 
*/
function formatUrl(url) {
	var str = url;
	if (url.substring(0, 6) != "http://" || url.substring(0, 7) != "https://") {
		str = "http://" + str;
	}
	return str;
}
/**
	Main funtion that do required functionality
*/
function checkWindowStatus(id, name, url, win) {
	//alert(url);
	if (win == "yes") {
		var tmp = formatUrl(url);
		window.open(tmp, name);
	} else {
		if (win == "null") {
			//alert("Not Defined");
			//Check Cookie and change
			if (Get_Cookie(id)) {
				if (Get_Cookie(id) == "yes") {
					checkWindowStatus(id, name, url, "yes");
				} else {
					checkWindowStatus(id, name, url, "no");
				}
			} else {
				popup("popUpDiv");
				tmpId = id;
				tmpName = name;
				tmpUrl = url;
				tmpWin = win;
			}
		} else {
			if (win == "no") {
				if (document.title != "Web Directory") {
		//Same Page Updation
					var submitForm = getNewSubmitForm();
					createNewFormElement(submitForm, "id", id);
					createNewFormElement(submitForm, "name", name);
					createNewFormElement(submitForm, "url", url);//alert(url);
					createNewFormElement(submitForm, "win", win);
					submitForm.action = "/ninthclick/WebDirectory.do";
					submitForm.submit();
				} else {
		//Web Directory Location
				
		//add to session web elements list
					initRequest371();
					xmlHttp371.onreadystatechange = processRequestTab2;
					xmlHttp371.open("GET", "/ninthclick/WebDirectoryAddTabAction.do?id=" + id + "&name=" + name + "&url=" + url + "&win=" + win, true);
					xmlHttp371.send(null);
		
		//Add Td
					var table = document.getElementById("tabstable");
					colorTab(table);
					var tr = table.getElementsByTagName("TR")[0];
					var td = document.createElement("TD");
					td.id = "closeButton" + id;
					td.width = "100px";
					td.height="18px";
					td.innerHTML = "<div style=\"width:100px;height:18px;\">" + "<table bgcolor=\"white\" id=\"inTab"+ id+ "\"class=\"mytable2\">" + "<tr><td width=\"85px\" onclick='javascript:updateFrameOnChange(" + id + ",\"" + url + "\",this.getElementsByTagName(\"a\")[0]);'><div style=\"width:85px;height:18px;overflow:hidden;\">" + " <a href=\"#\" id=\"aksa\" onclick='javascript:updateFrameOnChange(" + id + ",\"" + url + "\",this);' title=\""+name + "\">" + name + "</a>" + "</div></td><td width=\"15px\" align=\"left\">" + "<a href=\"#\"><img src=\"images/x1.png\" width=\"10\" height=\"10\" border=\"0\" vspace=\"center\" onclick=\"javascript:closeTab(this,'tablestable','" + id + "');\" title=\"close\"></a>"+ "</td></tr></table></div>"; 
					tr.appendChild(td);
					
					toRight('container');
					
		//Update Frame
					var iframevar = document.getElementById("tabshowdisplay");
					iframevar.src = formatUrl(url);
					currentId=id;
	
		//alert("Pranav");
				}
			}
		}
	}
}
var removeMicroId;
function closeTab(obj, tableId, id) {
	removeObj = obj;
	removeTableId = tableId;
	removeMicroId = id;
//update session and retrieve current details on server side
	initRequest369();
	xmlHttp369.onreadystatechange = processRequestTab1;
	xmlHttp369.open("GET", "/ninthclick/WebDirectoryUpdate.do?id=" + id, true);
	xmlHttp369.send(null);
	
	//Remove td
	var tdvar = obj.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
	var tableid = document.getElementById(tableid);
	var trvar = tdvar.parentNode;
	trvar.removeChild(tdvar);
	toRight1('container');
}
function processRequestTab1() {
	var url = "about:blank";
	var id = -1;
	if (xmlHttp369.readyState == 4) {
		if (xmlHttp369.status == 200) {
			textToSplit = xmlHttp369.responseText;
			var iframevar = document.getElementById("tabshowdisplay");
			if (textToSplit != "") {
				returnElements = textToSplit.split("$$");
				url = formatUrl(returnElements[2]);
				id = returnElements[0];
				currentId=id;
				colorTabWhite(id);
			//Update Frame
				if (!sComp(url, iframevar.src)) {
					iframevar.src = url;
				}
			} else {
				iframevar.src = "about:blank";
			}
			 
			
		}
	}
}
 
//Update Frame and update session ordering of urls 
function updateFrameOnChange(id, url,obj) {
	//alert(id + " " + url);
	initRequest370();
	xmlHttp370.onreadystatechange = processRequestTab2;
	xmlHttp370.open("GET", "/ninthclick/WebDirectoryUpdation.do?id=" + id, true);
	xmlHttp370.send(null);
	var iframevar = document.getElementById("tabshowdisplay");//alert(iframevar.src);
	iframevar.src = "http://" + url;
	currentId=id;
	//alert(obj.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode);
	var ttable=obj.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
	var rows = ttable.getElementsByTagName("tr");
	for(i = 0; i < rows.length; i++){
		var tds=rows[i].getElementsByTagName("td");
		for(j = 0; j < tds.length; j++){
			var divs=tds[j].getElementsByTagName("div");
			for(k = 0; k < divs.length; k++){
				var tmp=divs[k].getElementsByTagName("table");
				for(l = 0; l < tmp.length; l++){
					tmp[l].bgColor="#D8D8D8";
				}
			}
		}
		
	} 
	
	//obj.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.style.className="mytable";
	obj.parentNode.parentNode.parentNode.parentNode.parentNode.bgColor="white";
} 
  
  
//dummy function 
function processRequestTab2() {
}

//Remember processed URL in Frame
function updateURL(fUrl){
	initRequest370();
	xmlHttp370.onreadystatechange = processRequestTab2;
	xmlHttp370.open("GET", "/ninthclick/WebDirectoryUrlUpdation.do?id=" + currentId + "&url="+fUrl, true);
	xmlHttp370.send(null);
}


//helper function to create the form
function getNewSubmitForm() {
	var submitForm = document.createElement("FORM");
	document.body.appendChild(submitForm);
	submitForm.method = "POST";
	return submitForm;
}

//helper function to add elements to the form
function createNewFormElement(inputForm, elementName, elementValue) {
	var newElement = document.createElement("INPUT");
	newElement.setAttribute("type", "hidden");
	newElement.setAttribute("name", elementName);
	newElement.setAttribute("value", elementValue);
	inputForm.appendChild(newElement);
	return newElement;
}

//For mozilla removal of / from url
function sComp(str1, str2) {
	if (str1 == str2) {
		return true;
	} else {
		if (str1 == (str2.substring(0, str2.length - 1))) {
			return true;
		} else {
			return false;
		}
	}
}
function processRemember(form) {
	var today = new Date();
	var zero_date = new Date(0, 0, 0);
	today.setTime(today.getTime() - zero_date.getTime());
	var cookie_expire_date = new Date(today.getTime() + (8 * 7 * 86400000));
	
	if (form.wcheck[0].checked) {
		if (form.check.checked == true) {
			Set_Cookie(tmpId, "no", cookie_expire_date, "/ninthclick", false);
		}
		checkWindowStatus(tmpId, tmpName, tmpUrl, "no");
	} else {
		if (form.check.checked == true) {
			Set_Cookie(tmpId, "yes", cookie_expire_date, "/ninthclick", false);
		}
		checkWindowStatus(tmpId, tmpName, tmpUrl, "yes");
	}
	
}

function colorTab(ttable){
	var rows = ttable.getElementsByTagName("tr");
	for(i = 0; i < rows.length; i++){
		var tds=rows[i].getElementsByTagName("td");
		for(j = 0; j < tds.length; j++){
			var divs=tds[j].getElementsByTagName("div");
			for(k = 0; k < divs.length; k++){
				var tmp=divs[k].getElementsByTagName("table");
				for(l = 0; l < tmp.length; l++){
					tmp[l].bgColor="#D8D8D8";
				}
			/*	if(tmp.length!=0){
					tmp[tmp.length-1].bgColor="white";
				}else{
					tmp[tmp.length].bgColor="white";
				}*/
				
			}
		}
	}
}
function colorTabWhite(id){
	//colorTab(document.getElementById("tabstable"));
	var ttable = document.getElementById("inTab"+id);
	ttable.bgColor="white";
}

//Pop up div window
function toggle(div_id) {
	var el = document.getElementById(div_id);
	if (el.style.display == "none") {
		el.style.display = "block";
	} else {
		el.style.display = "none";
	}
}
function blanket_size(popUpDivVar) {
	if (typeof window.innerWidth != "undefined") {
		viewportheight = window.innerHeight;
	} else {
		viewportheight = document.documentElement.clientHeight;
	}
	if ((viewportheight > document.body.parentNode.scrollHeight) && (viewportheight > document.body.parentNode.clientHeight)) {
		blanket_height = viewportheight;
	} else {
		if (document.body.parentNode.clientHeight > document.body.parentNode.scrollHeight) {
			blanket_height = document.body.parentNode.clientHeight;
		} else {
			blanket_height = document.body.parentNode.scrollHeight;
		}
	}
	var blanket = document.getElementById("blanket");
	blanket.style.height = blanket_height + "px";
	var popUpDiv = document.getElementById(popUpDivVar);
	popUpDiv_height = blanket_height / 2 - 350;//150 is half popup's height
	popUpDiv.style.top = popUpDiv_height + "px";
}
function window_pos(popUpDivVar) {
	if (typeof window.innerWidth != "undefined") {
		viewportwidth = window.innerHeight;
	} else {
		viewportwidth = document.documentElement.clientHeight;
	}
	if ((viewportwidth > document.body.parentNode.scrollWidth) && (viewportwidth > document.body.parentNode.clientWidth)) {
		window_width = viewportwidth;
	} else {
		if (document.body.parentNode.clientWidth > document.body.parentNode.scrollWidth) {
			window_width = document.body.parentNode.clientWidth;
		} else {
			window_width = document.body.parentNode.scrollWidth;
		}
	}
	var popUpDiv = document.getElementById(popUpDivVar);
	window_width = window_width / 2 - 150;//150 is half popup's width
	popUpDiv.style.left = window_width + "px";
}
function popup(windowname) {
	blanket_size(windowname);
	window_pos(windowname);
	toggle("blanket");
	toggle(windowname);
}

//Remember Choice Option
function Get_Cookie(name) {
	var start = document.cookie.indexOf(name + "=");
	var len = start + name.length + 1;
	if ((!start) && (name != document.cookie.substring(0, name.length))) {
		return null;
	}
	if (start == -1) {
		return null;
	}
	var end = document.cookie.indexOf(";", len);
	if (end == -1) {
		end = document.cookie.length;
	}
	return unescape(document.cookie.substring(len, end));
}
function Set_Cookie(name, value, expires, path, domain, secure) {
	var cookieString = name + "=" + escape(value) + ((expires) ? ";expires=" + expires.toGMTString() : "") + ((path) ? ";path=" + path : "") + ((domain) ? ";domain=" + domain : "") + ((secure) ? ";secure" : "");
	document.cookie = cookieString;
}
function Delete_Cookie(name, path, domain) {
	if (Get_Cookie(name)) {
		document.cookie = name + "=" + ((path) ? ";path=" + path : "") + ((domain) ? ";domain=" + domain : "") + ";expires=Thu, 01-Jan-70 00:00:01 GMT";
	}
}
/*
function setVisitorID() {
   if (Get_Cookie('VisitorID')) {
       var VisitorID = Get_Cookie('VisitorID');
   }else{
       Set_Cookie('VisitorID',Math.random(),cookie_expire_date);
   }
}

function setSessionID() {
   if (!Get_Cookie('SessionID'))
       Set_Cookie('SessionID',Math.random());
}

var loaded_script = true; 
*/

////////////////////////////////
/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Mr J | http://www.huntingground.net/ */

scrollStep=1

timerLeft=""
timerRight=""


function toLeft(id){
  document.getElementById(id).scrollLeft=0
}

function scrollDivLeft(id){
  clearTimeout(timerRight) 
  document.getElementById(id).scrollLeft+=scrollStep
  timerRight=setTimeout("scrollDivLeft('"+id+"')",10)
}

function scrollDivRight(id){
  clearTimeout(timerLeft)
  document.getElementById(id).scrollLeft-=scrollStep
  timerLeft=setTimeout("scrollDivRight('"+id+"')",10)
}

function toRight(id){
  document.getElementById(id).scrollLeft=document.getElementById(id).scrollWidth
}

function toRight1(id){
  document.getElementById(id).scrollRight+=100;
}

function stopMe(){
  clearTimeout(timerRight) 
  clearTimeout(timerLeft)
}

function ab(){
var s=document.getElementById("tabshowdisplay");
//alert(s.contentDocument.location.href);
}




