//	Global value - At the time of QuickUpdate at list.php page in JOB the newly updated value is stored here
var global_updateOnlyOneField_newValue = '';
//	Global value - At the time of QuickUpdate at list.php page in JOB the lebel TAG which is to be updated
var global_updateOnlyOneField_lebelID = '';
//	Global value - At the time of QuickUpdate at list.php page in JOB the TEXTBOX or SELETBOX which is to be updated
var global_updateOnlyOneField_textBoxID = '';
//	Global value - At the time of QuickUpdate at list.php page in JOB the SELETBOX selectedText is stored here
var global_dropDownText = '';
//	Global value - When AJAX returns content at list.php page in JOB the mainTable content is stored here
var global_tempMainTableContent = '';
//	Global value - When AJAX returns content at list.php page in JOB the content is stored here
var global_newMainTableContent = '';
//	Global value - When The list-view.php is about to be called then this two variable are necessery
var global_param = '';
var global_ascDesc = '';

//	Global value - When Full EDIT is done at list.php page in JOB the content is stored here to change the list view only
global_JOBCategoryText = '';
global_MemberText = '';
global_CityText = '';
global_DistrictText = '';
global_ApproxAnnualPay = '';



<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_dragLayer(objName,x,hL,hT,hW,hH,toFront,dropBack,cU,cD,cL,cR,targL,targT,tol,dropJS,et,dragJS) { //v4.01
  //Copyright 1998 Macromedia, Inc. All rights reserved.
  var i,j,aLayer,retVal,curDrag=null,curLeft,curTop,IE=document.all,NS4=document.layers;
  var NS6=(!IE&&document.getElementById), NS=(NS4||NS6); if (!IE && !NS) return false;
  retVal = true; if(IE && event) event.returnValue = true;
  if (MM_dragLayer.arguments.length > 1) {
    curDrag = MM_findObj(objName); if (!curDrag) return false;
    if (!document.allLayers) { document.allLayers = new Array();
      with (document) if (NS4) { for (i=0; i<layers.length; i++) allLayers[i]=layers[i];
        for (i=0; i<allLayers.length; i++) if (allLayers[i].document && allLayers[i].document.layers)
          with (allLayers[i].document) for (j=0; j<layers.length; j++) allLayers[allLayers.length]=layers[j];
      } else {
        if (NS6) { var spns = getElementsByTagName("span"); var all = getElementsByTagName("div"); 
          for (i=0;i<spns.length;i++) if (spns[i].style&&spns[i].style.position) allLayers[allLayers.length]=spns[i];}
        for (i=0;i<all.length;i++) if (all[i].style&&all[i].style.position) allLayers[allLayers.length]=all[i]; 
    } }
    curDrag.MM_dragOk=true; curDrag.MM_targL=targL; curDrag.MM_targT=targT;
    curDrag.MM_tol=Math.pow(tol,2); curDrag.MM_hLeft=hL; curDrag.MM_hTop=hT;
    curDrag.MM_hWidth=hW; curDrag.MM_hHeight=hH; curDrag.MM_toFront=toFront;
    curDrag.MM_dropBack=dropBack; curDrag.MM_dropJS=dropJS;
    curDrag.MM_everyTime=et; curDrag.MM_dragJS=dragJS;
    curDrag.MM_oldZ = (NS4)?curDrag.zIndex:curDrag.style.zIndex;
    curLeft= (NS4)?curDrag.left:(NS6)?parseInt(curDrag.style.left):curDrag.style.pixelLeft; 
    if (String(curLeft)=="NaN") curLeft=0; curDrag.MM_startL = curLeft;
    curTop = (NS4)?curDrag.top:(NS6)?parseInt(curDrag.style.top):curDrag.style.pixelTop; 
    if (String(curTop)=="NaN") curTop=0; curDrag.MM_startT = curTop;
    curDrag.MM_bL=(cL<0)?null:curLeft-cL; curDrag.MM_bT=(cU<0)?null:curTop-cU;
    curDrag.MM_bR=(cR<0)?null:curLeft+cR; curDrag.MM_bB=(cD<0)?null:curTop+cD;
    curDrag.MM_LEFTRIGHT=0; curDrag.MM_UPDOWN=0; curDrag.MM_SNAPPED=false; //use in your JS!
    document.onmousedown = MM_dragLayer; document.onmouseup = MM_dragLayer;
    if (NS) document.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  } else {
    var theEvent = ((NS)?objName.type:event.type);
    if (theEvent == 'mousedown') {
      var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
      var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
      var maxDragZ=null; document.MM_maxZ = 0;
      for (i=0; i<document.allLayers.length; i++) { aLayer = document.allLayers[i];
        var aLayerZ = (NS4)?aLayer.zIndex:parseInt(aLayer.style.zIndex);
        if (aLayerZ > document.MM_maxZ) document.MM_maxZ = aLayerZ;
        var isVisible = (((NS4)?aLayer.visibility:aLayer.style.visibility).indexOf('hid') == -1);
        if (aLayer.MM_dragOk != null && isVisible) with (aLayer) {
          var parentL=0; var parentT=0;
          if (NS6) { parentLayer = aLayer.parentNode;
            while (parentLayer != null && parentLayer.style.position) {             
              parentL += parseInt(parentLayer.offsetLeft); parentT += parseInt(parentLayer.offsetTop);
              parentLayer = parentLayer.parentNode;
          } } else if (IE) { parentLayer = aLayer.parentElement;       
            while (parentLayer != null && parentLayer.style.position) {
              parentL += parentLayer.offsetLeft; parentT += parentLayer.offsetTop;
              parentLayer = parentLayer.parentElement; } }
          var tmpX=mouseX-(((NS4)?pageX:((NS6)?parseInt(style.left):style.pixelLeft)+parentL)+MM_hLeft);
          var tmpY=mouseY-(((NS4)?pageY:((NS6)?parseInt(style.top):style.pixelTop) +parentT)+MM_hTop);
          if (String(tmpX)=="NaN") tmpX=0; if (String(tmpY)=="NaN") tmpY=0;
          var tmpW = MM_hWidth;  if (tmpW <= 0) tmpW += ((NS4)?clip.width :offsetWidth);
          var tmpH = MM_hHeight; if (tmpH <= 0) tmpH += ((NS4)?clip.height:offsetHeight);
          if ((0 <= tmpX && tmpX < tmpW && 0 <= tmpY && tmpY < tmpH) && (maxDragZ == null
              || maxDragZ <= aLayerZ)) { curDrag = aLayer; maxDragZ = aLayerZ; } } }
      if (curDrag) {
        document.onmousemove = MM_dragLayer; if (NS4) document.captureEvents(Event.MOUSEMOVE);
        curLeft = (NS4)?curDrag.left:(NS6)?parseInt(curDrag.style.left):curDrag.style.pixelLeft;
        curTop = (NS4)?curDrag.top:(NS6)?parseInt(curDrag.style.top):curDrag.style.pixelTop;
        if (String(curLeft)=="NaN") curLeft=0; if (String(curTop)=="NaN") curTop=0;
        MM_oldX = mouseX - curLeft; MM_oldY = mouseY - curTop;
        document.MM_curDrag = curDrag;  curDrag.MM_SNAPPED=false;
        if(curDrag.MM_toFront) {
          eval('curDrag.'+((NS4)?'':'style.')+'zIndex=document.MM_maxZ+1');
          if (!curDrag.MM_dropBack) document.MM_maxZ++; }
        retVal = false; if(!NS4&&!NS6) event.returnValue = false;
    } } else if (theEvent == 'mousemove') {
      if (document.MM_curDrag) with (document.MM_curDrag) {
        var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
        var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
        newLeft = mouseX-MM_oldX; newTop  = mouseY-MM_oldY;
        if (MM_bL!=null) newLeft = Math.max(newLeft,MM_bL);
        if (MM_bR!=null) newLeft = Math.min(newLeft,MM_bR);
        if (MM_bT!=null) newTop  = Math.max(newTop ,MM_bT);
        if (MM_bB!=null) newTop  = Math.min(newTop ,MM_bB);
        MM_LEFTRIGHT = newLeft-MM_startL; MM_UPDOWN = newTop-MM_startT;
        if (NS4) {left = newLeft; top = newTop;}
        else if (NS6){style.left = newLeft; style.top = newTop;}
        else {style.pixelLeft = newLeft; style.pixelTop = newTop;}
        if (MM_dragJS) eval(MM_dragJS);
        retVal = false; if(!NS) event.returnValue = false;
    } } else if (theEvent == 'mouseup') {
      document.onmousemove = null;
      if (NS) document.releaseEvents(Event.MOUSEMOVE);
      if (NS) document.captureEvents(Event.MOUSEDOWN); //for mac NS
      if (document.MM_curDrag) with (document.MM_curDrag) {
        if (typeof MM_targL =='number' && typeof MM_targT == 'number' &&
            (Math.pow(MM_targL-((NS4)?left:(NS6)?parseInt(style.left):style.pixelLeft),2)+
             Math.pow(MM_targT-((NS4)?top:(NS6)?parseInt(style.top):style.pixelTop),2))<=MM_tol) {
          if (NS4) {left = MM_targL; top = MM_targT;}
          else if (NS6) {style.left = MM_targL; style.top = MM_targT;}
          else {style.pixelLeft = MM_targL; style.pixelTop = MM_targT;}
          MM_SNAPPED = true; MM_LEFTRIGHT = MM_startL-MM_targL; MM_UPDOWN = MM_startT-MM_targT; }
        if (MM_everyTime || MM_SNAPPED) eval(MM_dropJS);
        if(MM_dropBack) {if (NS4) zIndex = MM_oldZ; else style.zIndex = MM_oldZ;}
        retVal = false; if(!NS) event.returnValue = false; }
      document.MM_curDrag = null;
    }
    if (NS) document.routeEvent(objName);
  } return retVal;
}
// To close the Div
function image_hide(id){
	el = document.getElementById(id);
	el.style.display ='none';
}
function image_show(id){
	el = document.getElementById(id);
	el.style.display ='block';
}
//-->

<!--

// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.
var IE = document.all?true:false

// If NS -- that is, !IE -- then set up for mouse capture
if (!IE) document.captureEvents(Event.MOUSEMOVE)

// Set-up to use getMouseXY function onMouseMove
//document.onmousemove = getMouseXY;

// Temporary variables to hold mouse x-y pos.s
var tempX = 0
var tempY = 0

// Main function to retrieve mouse x-y pos.s

function getMouseXY(e) {
var divLeft=document.getElementById("menu").style.left;
var divTop =document.getElementById("menu").style.top;
  //document.form1.MouseX.value = divLeft
  //document.form1.MouseY.value = divTop
  return true
}
function spam1_hide(){
	el = document.getElementById('close');
	el.style.display ='none';
	el1 = document.getElementById('right');
	el1.style.display ='block';
	el2 = document.getElementById('form');
	el2.style.display ='none';
}
function spam1_show(){
	el = document.getElementById('right');
	el.style.display ='none';
	el1 = document.getElementById('close');
	el1.style.display ='block';
	el2 = document.getElementById('form');
	el2.style.display ='block';
}
function spam_hide(){
	el = document.getElementById('close');
	el.style.display ='none';
	el1 = document.getElementById('right');
	el1.style.display ='block';
	el2 = document.getElementById('form');
	el2.style.display ='none';
}
function spam_show(){
	el3 = document.getElementById('close1');
	el3.style.display ='none';
	el4 = document.getElementById('add');
	el4.style.display ='none';
	el = document.getElementById('right');
	el.style.display ='none';
	el1 = document.getElementById('close');
	el1.style.display ='block';
	el2 = document.getElementById('form');
	el2.style.display ='block';
}
function add_hide(){
	el = document.getElementById('close1');
	el.style.display ='none';
	el1 = document.getElementById('right');
	el1.style.display ='block';
	el2 = document.getElementById('add');
	el2.style.display ='none';
}
function add_show(){
	el3 = document.getElementById('close');
	el3.style.display ='none';
	el4 = document.getElementById('form');
	el4.style.display ='none';
	el = document.getElementById('right');
	el.style.display ='none';
	el1 = document.getElementById('close1');
	el1.style.display ='block';
	el2 = document.getElementById('add');
	el2.style.display ='block';
}
//-->
//-------------------------  MAIN AJAX FUNCTION  ----------------------------------------
function createAJAXObject(){
	var ajax = false;
	if (window.XMLHttpRequest){ 
		ajax = new XMLHttpRequest(); 
	}
	else if (window.ActiveXObject){
		try{
			ajax = new ActiveXObject("Microsoft.XMLHTTP");
		} 
		catch(e){
			try{
				  ajax = new ActiveXObject("Msxml2.XMLHTTP");
			} 
			catch(e){
				  ajax = false;
			}
		}
	}
	
	return ajax;
}
//---------------------  END OF MAIN AJAX FUNCTION  -------------------------------------

function showRegistration(userType)
{
	time1=window.setTimeout("redirect('"+userType+"')",.2); 
}
function detime()
{
	window.clearTimeout(time1);
}
function redirect(userType)
{
 	var opacityLevel;
	var opacityLevelNew;
	opacityLevel=document.getElementById('opacityLevelHidden').value;
	
	if(opacityLevel<=85)
	{
		document.getElementById('divFade').style.display='block';
		var e;
		e=document.getElementById('ibox_w');
		e.style.filter='alpha(opacity='+opacityLevel+')';
		e.style.opacity=opacityLevel/100;
		
		opacityLevelNew=(opacityLevel*1)+3;
		document.getElementById('opacityLevelHidden').value=opacityLevelNew;
		if(opacityLevelNew > 82)
		{
			document.getElementById('divRegistration').style.display='block';
			showRegistrationForm(userType);
			detime();
		}
		showRegistration(userType) ;
	}
}


//------------------------  SHOW REGISTRATION FORM by Ajax Function  ----------------------------------------
function showRegistrationForm(userType)
{
	var XmlHttp = createAJAXObject();
	if(!XmlHttp)
	{ }
	else
	{
		url="../../include/via-page.php?UserType="+escape(userType);
		//alert(url);
		//url="forgot-password.html";
		XmlHttp.open("GET",url,true);
		XmlHttp.onreadystatechange=function()
		{
			
			if(XmlHttp.readyState==4)
			{
				if(XmlHttp.status==200)
				{
					var displayData = XmlHttp.responseText;
					//alert(displayData);
					//alert(global_newMainTableContent);
					if(global_newMainTableContent=='')
						document.getElementById("ibox_content").innerHTML = displayData;
					else
						document.getElementById("ibox_content").innerHTML = global_newMainTableContent;
				}
			}
		}
		XmlHttp.send(null)
	}
}
//---------------------  END OF SHOW REGISTRATION FORM by Ajax Function  ------------------------------------
//--------------------------  BACK TO PREVIOUS VIEW (Original View) -----------------------------------------
//	Back Dated showLoginGate1()
function showLoginGate1()
{
	document.getElementById('divFade').style.display='none';
	document.getElementById('divRegistration').style.display='none';
	document.getElementById('opacityLevelHidden').value=1;
	document.getElementById("ibox_content").innerHTML = '';
}
//	Back Dated showLoginGate1()

//--------------------Email Validation----------------------------------------------
function Validate_Email_Address(email)
{
	//Assumes that valid email addresses consist of user_name@domain.tld
	at = email.indexOf('@');
	dot = email.indexOf('.');
	
	if(at == -1 || dot == -1 || dot <= at + 1 || dot == 0 || dot == email.length - 1)
		return(false);
	
	user_name = email.substr(0, at);
	domain_name = email.substr(at + 1, email.length);                  
	
	if(Validate_String(user_name) === false || 	Validate_String(domain_name) === false)
		return(false);                     
	
	return(true);
}

function Validate_String(string, return_invalid_chars)
{
	valid_chars = '1234567890-_.^~abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
	invalid_chars = '';
	
	if(string == null || string == '')
		return(true);
	
	//For every character on the string.   
	for(index = 0; index < string.length; index++)
	{
		char = string.substr(index, 1);                        
	
		//Is it a valid character?
		if(valid_chars.indexOf(char) == -1)
		{
			//If not, is it already on the list of invalid characters?
			if(invalid_chars.indexOf(char) == -1)
			{
				//If it's not, add it.
				if(invalid_chars == '')
					invalid_chars += char;
				else
					invalid_chars += ', ' + char;
			}
		}
	}                     
	
	//If the string does not contain invalid characters, the function will return true.
	//If it does, it will either return false or a list of the invalid characters used
	//in the string, depending on the value of the second parameter.
	if(return_invalid_chars == true && invalid_chars != '')
	{
		last_comma = invalid_chars.lastIndexOf(',');
		
		if(last_comma != -1)
			invalid_chars = invalid_chars.substr(0, $last_comma) + 	' and ' + invalid_chars.substr(last_comma + 1, invalid_chars.length);
	
		return(invalid_chars);
	}
	else
		return(invalid_chars == ''); 
}
//----------------------------------------------------------------------------------------------------
//------------------------  ADMIN FORGOT PASSWORD by Ajax Function  ----------------------------------------
function sendAdminPassword(EmailID)
{
	var XmlHttp = createAJAXObject();
	if(!XmlHttp)
	{ }
	else
	{
		url="forget_pass_pop_pro.php?txtEmailID="+escape(EmailID);
		//alert(url);
		//url="forgot-password.html";
		XmlHttp.open("GET",url,true);
		XmlHttp.onreadystatechange=function()
		{
			
			if(XmlHttp.readyState==4)
			{
				if(XmlHttp.status==200)
				{
					var displayData = XmlHttp.responseText;
					var tempMailId = new Array();
					var tempMailId = displayData.split('^|^') ;
					
					if(tempMailId[1] =='Y') alert(tempMailId[0]+" Please check your Mail to retrive password.");
					else alert(tempMailId[0]);
					showLoginGate1();
				}
			}
		}
		XmlHttp.send(null)
	}
}
//---------------------  END OF ADMIN FORGOT PASSWORD by Ajax Function  ------------------------------------
function ChkEmail(mail)
{
		var str=mail;
				
		if (!str=="")
		{
			if (str.indexOf("@",1) == -1)
			{
				alert("That is not a valid Email address. Please enter again.");
				return false;
			}
			if (str.indexOf("@",1)== 0)
			{
				alert("That is not a valid Email address. Please enter again.");
				return false;
			}
			if (str.indexOf(".")== 0)
			{
				alert("That is not a valid Email address. Please enter again.");
				return false;
			}
			if (str.indexOf(".",1) == -1)
			{
				alert("That is not a valid Email address. Please enter again.");
				return false;
			}
		
			// extra validation
			var posat=str.indexOf("@");
			var posdot=str.indexOf(".");
			var rposdot=str.lastIndexOf(".");
			if(rposdot==posdot)
			if((posdot < posat) || (posdot-posat < 3))
			{
				alert("That is not a valid Email address. Please enter again.");
				return false;
			}
			if(str.charAt(str.length-1)==".")
			{
				alert("That is not a valid Email address. Please enter again.");
				return false;
			}
			if(str.charAt(str.length-1)=="@")
			{
				alert("That is not a valid Email address. Please enter again.");
				return false;
			}
			var j=0;
			for( var i=0;i<str.length;i++)
			{
				if(str.charAt(i) == "@")
				j++;
			}
			if(j > 1)
			{
			alert("That is not a valid Email address. Please enter again.");
			return false;
			}
		}
		return true;
}

function trim(str) 
{ 
    return str.replace(/^\s+|\s+$/g,''); 
} 

function validate()
{
	EmailID=trim(document.getElementById('txtEmailID').value);

	if(EmailID=="")
	{
		alert("Please Enter your Email ID");
		document.getElementById('txtEmailID').focus();
		return false;
	}
		if(!ChkEmail(EmailID))
	{
		document.getElementById('txtEmailID').focus();
		return false;
	}
	
	sendAdminPassword(EmailID)
	return false;
}


	       

//	SIGNUP FLOAT LIGHT BOX MANIPULATION .
function signup_float_validate()
{
	var FloatEmailID = document.getElementById('FloatEmailID').value;
	if(FloatEmailID =='' )
	{
		alert("Please Enter Proper Value in EmailID");
		document.getElementById('FloatEmailID').focus();
		return false;
	}

	var FloatPassword = document.getElementById('FloatPassword').value;
	if(FloatPassword =='')
	{
		alert("Please Enter Proper Value in Password");
		document.getElementById('FloatPassword').focus();
		return false;
	}
	
	var FloatConfirmPassword = document.getElementById('FloatConfirmPassword').value;
	if(FloatConfirmPassword =='')
	{
		alert("Please Enter Proper Value in Confirm Password");
		document.getElementById('FloatConfirmPassword').focus();
		return false;
	}
	
	if(FloatPassword != FloatConfirmPassword)
	{
		alert("Your Confirm Password is not matched");
		return false;
	}

	var FloatUsername = document.getElementById('FloatUsername').value;
	if(FloatUsername =='')
	{
		alert("Please Enter Proper Value in Username");
		document.getElementById('FloatUsername').focus();
		return false;
	}
	
	var FloatFirstName = document.getElementById('FloatFirstName').value;
	if(FloatFirstName =='')
	{
		alert("Please Enter Proper Value in FirstName");
		document.getElementById('FloatFirstName').focus();
		return false;
	}

	var FloatLastName = document.getElementById('FloatLastName').value;
	if(FloatLastName =='')
	{
		alert("Please Enter Proper Value in LastName");
		document.getElementById('FloatLastName').focus();
		return false;
	}
	
	var Gender = '';
	var GenderM = document.getElementById("FloatGenderM");
	var GenderF = document.getElementById("FloatGenderF");
	if(GenderM.checked) Gender = GenderM.value;
	if(GenderF.checked) Gender = GenderF.value;
	if(Gender=='')
	{
		alert('Please Select Gender');
		return false;
	}
	
	var FloatContactPhoneCode = document.getElementById("FloatContactPhoneCode").options[document.getElementById("FloatContactPhoneCode").selectedIndex].value;
	if(FloatContactPhoneCode =='')
	{
		alert("Please Select Proper Value in Contact Phone Code");
		document.getElementById('FloatContactPhoneCode').focus();
		return false;
	}
	
	var FloatContactPhone = document.getElementById('FloatContactPhone').value;
	if(FloatContactPhone =='')
	{
		alert("Please Enter Proper Value in ContactPhone");
		document.getElementById('FloatContactPhone').focus();
		return false;
	}
	if(checknumber(FloatContactPhone) == false)
	{
		document.getElementById("FloatContactPhone").focus();
		return false;
	}
	
	var FloatMobilePhoneCode = document.getElementById("FloatMobilePhoneCode").options[document.getElementById("FloatMobilePhoneCode").selectedIndex].value;
	if(FloatMobilePhoneCode =='')
	{
		alert("Please Select Proper Value in Mobile Phone Code");
		document.getElementById('FloatMobilePhoneCode').focus();
		return false;
	}
	
	
	var FloatMobilePhone = document.getElementById('FloatMobilePhone').value;
	if(FloatMobilePhone =='')
	{
		alert("Please Enter Proper Value in MobilePhone");
		document.getElementById('FloatMobilePhone').focus();
		return false;
	}
	if(checknumber(FloatMobilePhone) == false)
	{
		document.getElementById("FloatMobilePhone").focus();
		return false;
	}
	
	var FloatAddress = document.getElementById('FloatAddress').value;
	if(FloatAddress =='')
	{
		alert("Please Enter Proper Value in Address");
		document.getElementById('FloatAddress').focus();
		return false;
	}
	
	var FloatLocation = document.getElementById("FloatLocation").options[document.getElementById("FloatLocation").selectedIndex].value;
	if(FloatLocation =='')
	{
		alert("Please Select a city");
		document.getElementById('FloatLocation').focus();
		return false;
	}

	var FloatDistrict = document.getElementById("FloatDistrict").options[document.getElementById("FloatDistrict").selectedIndex].value;
	if(FloatDistrict =='')
	{
		alert("Please Select a Disrtrict");
		document.getElementById('FloatDistrict').focus();
		return false;
	}

	var FloatSuburb = document.getElementById("FloatSuburb").options[document.getElementById("FloatSuburb").selectedIndex].value;
	if(FloatSuburb =='')
	{
		alert("Please Select a Suburb");
		document.getElementById('FloatSuburb').focus();
		return false;
	}

	var FloatPostalCode = document.getElementById('FloatPostalCode').value;
	if(FloatPostalCode =='')
	{
		alert("Please Enter Proper Value in PostalCode");
		document.getElementById('FloatPostalCode').focus();
		return false;
	}

	var FloatTC = document.getElementById('FloatTC').checked;
	if(!FloatTC)
	{
		alert("Please Select a Terms And Condition");
		document.getElementById('FloatTC').focus();
		return false;
	}
	else FloatTCValue = document.getElementById('FloatTC').value;

	var FloatDOBYear = document.getElementById('FloatDOBYear').value;
	var FloatDOBMonth = document.getElementById('FloatDOBMonth').value;
	var FloatDOBDay = document.getElementById('FloatDOBDay').value;

	var FloatDOBYear = document.getElementById("FloatDOBYear").options[document.getElementById("FloatDOBYear").selectedIndex].value;
	var FloatDOBMonth = document.getElementById("FloatDOBMonth").options[document.getElementById("FloatDOBMonth").selectedIndex].value;
	var FloatDOBDay = document.getElementById("FloatDOBDay").options[document.getElementById("FloatDOBDay").selectedIndex].value;

	var FloatDOB = FloatDOBYear + '-' + FloatDOBMonth + '-' + FloatDOBDay;
	//return false;

	url="signup-process.php?FloatEmailID="+FloatEmailID+"&FloatPassword="+FloatPassword+"&FloatUsername="+FloatUsername+"&FloatFirstName="+FloatFirstName+"&FloatLastName="+FloatLastName+"&Gender="+Gender+"&FloatContactPhone="+FloatContactPhone+"&FloatMobilePhoneCode="+FloatMobilePhoneCode+"&FloatMobilePhone="+FloatMobilePhone+"&FloatAddress="+FloatAddress+"&FloatLocation="+FloatLocation+"&FloatDistrict="+FloatDistrict+"&FloatSuburb="+FloatSuburb+"&FloatPostalCode="+FloatPostalCode+"&FloatContactPhoneCode="+FloatContactPhoneCode+"&FloatTCValue="+FloatTCValue+"&FloatDOB="+FloatDOB;
	//alert(url);
	ajax.requestFile = url;	// Specifying which file to get
	ajax.onCompletion = SHOW_signup_float_validate;	// Specify function that will be executed after file has been found
	ajax.runAJAX();
	
}


function SHOW_signup_float_validate()
{
	var content = ajax.response;
	//alert('>'+content+'<');
	if(content != 'Success')
	{
		document.getElementById('LoginErrorMsg').innerHTML = 'User Already Exists';
	}
	else
	{
		//content_1 = content.replace('|','?');
		//content_2 = content_1.replace(/:/g,"&");
		document.getElementById('LoginErrorMsg').innerHTML = 'Registration Successful';
		//window.location.href = 'index.php';
	}
}	
//	END ======================== LOGIN FLOAT LIGHT BOX MANIPULATION .

//	SELECT STATES .
function OnChangeCountry(Obj,Mode,DisplayDiv,SiteSection) 
{
	if(SiteSection == 'AdminSection')
		var Path = '../../';
	else
	 	var Path = '';
	
	var ID = Obj.value;
	url = Path+'country-state-city.php?ID='+ID+'&Mode='+Mode+'&DisplayDiv='+DisplayDiv+'&SiteSection='+SiteSection;
	//alert(url);
	ajax.reset();
	ajax.createAJAX();
	ajax.method = "POST";
	ajax.requestFile = url;	// Specifying which file to get
	ajax.onCompletion = SHOW_OnChangeCountry;	// Specify function that will be executed after file has been found
	ajax.runAJAX();	
} 
function SHOW_OnChangeCountry()
{
	var content = ajax.response;
	//alert(content);
	
	var ArrayContent = new Array();
	var ArrayContent = content.split('^|^') ;
	
	//document.getElementById(ArrayContent[1]).innerHTML = '';
	document.getElementById(ArrayContent[1]).innerHTML = ArrayContent[0];
}
//	-----------------------------------
function OnChangeCountryCopy(ID,Mode,DisplayDiv,SiteSection,SelectedVal) 
{
	if(SiteSection == 'AdminSection')
		var Path = '../../';
	else
	 	var Path = '';

	url = Path+'country-state-city.php?ID='+ID+'&Mode='+Mode+'&DisplayDiv='+DisplayDiv+'&SiteSection='+SiteSection+'&SelectedVal='+SelectedVal;
	//alert(url);

			var ajaxIndex = ajaxObjects.length;
			ajaxObjects[ajaxIndex] = new sack();
			ajaxObjects[ajaxIndex].requestFile = url;	// Specifying which file to get
			ajaxObjects[ajaxIndex].onCompletion = function() { SHOW_OnChangeCountryCopy(ajaxIndex); } ;	// Specify function that will be executed after file has been found
			ajaxObjects[ajaxIndex].runAJAX();		// Execute AJAX function			

} 
function SHOW_OnChangeCountryCopy(index)
{
	var content = ajaxObjects[index].response
	//alert(content);
	
	var ArrayContent = new Array();
	var ArrayContent = content.split('^|^') ;
	
	//document.getElementById(ArrayContent[1]).innerHTML = '';
	document.getElementById(ArrayContent[1]).innerHTML = ArrayContent[0];
}
//	END ======================== SELECT STATES .

//	SELECT CHARECTER LEFT.
function char_count(MaxChr,ReadTxtId,CountTxtId)
{
	if(document.getElementById(ReadTxtId).value.length <= MaxChr)
	{
		charcount = MaxChr - document.getElementById(ReadTxtId).value.length;
		document.getElementById(CountTxtId).value = charcount;
		return true;
	}
	else
	{
		document.getElementById(ReadTxtId).value = document.getElementById(ReadTxtId).value.substr(0,MaxChr);
		alert("You can not exceed 5000 characters");
		return false;
	}  
}

function PageRedirect(PagePath)
{
	window.location.href = PagePath;
}
//	END ======================== SELECT CHARECTER LEFT .

//	SELECT CHARECTER LEFT.
function ChoosePostProjectType(PostProjectType)
{
	//alert(PostProjectType );
	if(PostProjectType == 'ExistingEvent')
	{
		document.getElementById('ExistingEvent').style.display = '';
		document.getElementById('AddEventDetail').style.display = 'none';
	}
	
	if(PostProjectType == 'Independently')
	{
		document.getElementById('ExistingEvent').style.display = 'none';
		document.getElementById('AddEventDetail').style.display = 'none';
	}
	
	if(PostProjectType == 'AddEventAndPostProject')
	{
		document.getElementById('ExistingEvent').style.display = 'none';
		document.getElementById('AddEventDetail').style.display = '';
	}
	
	
}
//	END ======================== SELECT CHARECTER LEFT.

/*	This function is used on the user selecting a location
	from the drop-down menu named "LOCATION_ID".  It disables
	or enables and checks or unchecks the DST checkbox */

	function activateDSTBox(location_id)
	{
		switch (location_id)
		{
			case '0':
			case '1':
			case '2':
			case '3':
			case '6':
			case '9':
			case '12':
			case '13':
			case '15':
			case '17':
			case '21':
			case '25':
			case '26':
			case '32':
			case '36':
			case '38':
			case '40':
			case '42':
			case '44':
			case '46':
			case '48':
			case '49':
			case '50':
			case '52':
			case '53':
			case '54':
			case '55':
			case '57':
			case '59':
			case '60':
			case '61':
			case '62':
			case '63':
			case '66':
			case '67':
			case '69':
			case '72':
			case '74':
			case '75':
				document.form.DST.disabled = true;
				document.form.DST.checked = false;
				break;
			default:
				document.form.DST.disabled = false;
				document.form.DST.checked = true;
				break;
		}
		
		return true
	}
/*	This function is used on the user selecting a location
	from the drop-down menu named "LOCATION_ID".  It disables
	or enables and checks or unchecks the DST checkbox */


//	SHOW SPECIFIC DIV AFTER CHOOSING A Service Category IN PROJECT POSTING (project-post.php) PAGE.
function ShowSubSC(OpenDivId,DivMainCategoryName)
{
	var AllServiceCategoryID = document.getElementById('AllServiceCategoryID').value;

	var ArrayAllServiceCategoryID = Array();
	ArrayAllServiceCategoryID = AllServiceCategoryID.split(',');
	//alert(ArrayAllServiceCategoryID.count);
	for(i=0;i<ArrayAllServiceCategoryID.length;i++)
	{
		tempDivId = 'DivArraySubServiceCategory' + ArrayAllServiceCategoryID[i];
		//alert(OpenDivId);
		//alert(tempDivId);
		document.getElementById(tempDivId).style.display = 'none';//	TEMP COMMENT OUT - TO MAKE ONLY ONE DIV OPEN//	
		//alert('DONE');
		//eval("document.getElementById("+tempDivId+").style.display = '';");
	}
	
		//alert(AllServiceCategoryID);
	tempDivId = 'DivArraySubServiceCategory' + OpenDivId;
	document.getElementById(tempDivId).style.display = '';
		//alert('ioi');
	//document.getElementById('AllServiceCategoryID').style.display = '';
	tempDivId = 'HeadSubServiceCategory' ;
	document.getElementById(tempDivId).innerHTML = DivMainCategoryName;
		//alert('zxccz');
}
//	END ======================== SHOW SPECIFIC DIV AFTER CHOOSING A Service Category IN PROJECT POSTING (project-post.php) PAGE.

//	CHECK ALL SUB-CATEGORIES OF A Service Category IN PROJECT POSTING (project-post.php) PAGE.
function CheckAllBox(chk)
{
	for (var i=0;i < document.post_sub_cat.elements.length;i++)
	{
		var e = document.post_sub_cat.elements[i];
		if (e.type == "checkbox")
    	{
			e.checked = chk.checked;
		}
    	else
    	{
    		if(e.name=="selectall") e.checked = '';
    	}
	}
}
//	END ======================== CHECK ALL SUB-CATEGORIES OF A Service Category IN PROJECT POSTING (project-post.php) PAGE.

//	SEARCH VENUES .
function SearchVenues(Mode,DisplayDiv,SiteSection) 
{
	//	ONE TIME SEARCH
//	if(	AllTrim(document.getElementById(DisplayDiv).innerHTML) != '')
//	{
//		document.getElementById(DisplayDiv).style.display = '';
//		return false;
//	}
	var CountryID = document.getElementById('Country').options[document.getElementById('Country').selectedIndex].value;
	var StateID = document.getElementById('State').options[document.getElementById('State').selectedIndex].value;
	var CityID = document.getElementById('City').options[document.getElementById('City').selectedIndex].value;


	if(SiteSection == 'AdminSection')
		var Path = '../../';
	else
	 	var Path = '';
	
	var ID = '77';
	url = Path+'search-venues.php?ID=77&Mode='+Mode+'&DisplayDiv='+DisplayDiv+'&SiteSection='+SiteSection+'&CountryID='+CountryID+'&StateID='+StateID+'&CityID='+CityID;
	//alert(url);
	ajax.reset();
	ajax.createAJAX();
	ajax.method = "POST";
	ajax.requestFile = url;	// Specifying which file to get
	ajax.onCompletion = SHOW_SearchVenues;	// Specify function that will be executed after file has been found
	ajax.runAJAX();	
} 
function SHOW_SearchVenues()
{
	var content = ajax.response;
	//alert(content);
	
	var ArrayContent = new Array();
	var ArrayContent = content.split('^|^') ;
	
	//alert(ArrayContent[1]);
	//alert(ArrayContent[0]);
	//alert(content);
	document.getElementById(ArrayContent[1]).style.display = '';
	//document.getElementById(ArrayContent[1]).innerHTML = '';
	document.getElementById(ArrayContent[1]).innerHTML = ArrayContent[0];
}
function SelectedSearch(Obj) 
{
	var prevValue = AllTrim(document.getElementById('Venue').value);
	var prevID = AllTrim(document.getElementById('VenueID').value);
	var ThisObjVal = Obj.value;
	//alert(ThisObjVal);
	var ArrayContent = new Array();
	var ArrayContent = ThisObjVal.split('^') ;
	
	//	only one value
	document.getElementById('Venue').value = ArrayContent[1];
	document.getElementById('VenueID').value = ArrayContent[0];
	//	only one value
	
//	if(Obj.checked == true)
//	{
//		//alert(ArrayContent[0]);
//		//alert(ArrayContent[1]);
//		if(AllTrim(prevValue) == '')
//			var separation = '';
//		else
//			var separation = ',';
//			
//		document.getElementById('Venue').value = prevValue + separation + AllTrim(ArrayContent[1]);
//		document.getElementById('VenueID').value = prevID + separation + AllTrim(ArrayContent[0]);
//	}
//	else
//	{
//		
//		var TempVal = AllTrim(prevValue) ;
//		var TempID = AllTrim(prevID) ;
//		var prevValueArray = new Array();
//		var prevValueArray = prevValue.split(',');
//		var prevIDArray = new Array();
//		var prevIDArray = prevID.split(',');
//		var NewVal = '';
//		var NewID = '';
//		
//		for(i=0;i<prevIDArray.length;i++)
//		{
////			alert(':' + prevValueArray[i] + ':' + ArrayContent[1] + ':');
//			if(AllTrim(prevIDArray[i]) == AllTrim(ArrayContent[0]))
//			{
////				alert('K');
//			}
//			else
//			{
//	
//				if(AllTrim(NewID) == '')
//					var separation = '';
//				else
//					var separation = ',';
//					
//				NewVal = NewVal + separation + prevValueArray[i] ;
//				NewID = NewID + separation + prevIDArray[i] ;
//				
////				alert('ELS'+NewVal);
//			}
//		}
////		alert(NewVal);
//		document.getElementById('Venue').value = NewVal;
//		document.getElementById('VenueID').value = NewID;
//		
////		var SearchStr = AllTrim(ArrayContent[1]);
////		TempVal.replace(SearchStr,"101");
////		
//	}
}
//	END ======================== SEARCH VENUES .


//	MY A/C JOB .
function MyAccountJob(Classification)
{
	url="my-account-job.php?Classification="+Classification;
	//alert(url);
	ajax.reset();
	ajax.createAJAX();
	ajax.requestFile = url;	// Specifying which file to get
	ajax.onCompletion = SHOW_MyAccountJob;	// Specify function that will be executed after file has been found
	ajax.runAJAX();
}	
function AjaxMyAccountJob(limit,param,page)
{

	url="my-account-job.php?limit="+limit+"&param="+param+"&page="+page;
	//alert(url);
	ajax.reset();
	ajax.createAJAX();
	ajax.requestFile = url;	// Specifying which file to get
	ajax.onCompletion = SHOW_MyAccountJob;	// Specify function that will be executed after file has been found
	ajax.runAJAX();
}	
function SHOW_MyAccountJob()
{
	var content = ajax.response;
	//alert(content);
	var ArrayContent = new Array();
	var ArrayContent = content.split(':.:') ;
	//alert(ArrayContent[1] + ' == session_expired');
	if(ArrayContent[1] == 'session_expired')
	{
		window.location.href = 'login.php';
	}
	else
	{
		
		if(document.getElementById("ShowMyAccountJob").style.display != 'none')
		{
			document.getElementById("ShowMyAccountJob").style.display = 'none';
			document.getElementById("HideMyAccountJob").style.display = '';
		}
	
		document.getElementById("DivMyAccountJob").innerHTML='';
		document.getElementById("DivMyAccountJob").innerHTML=content;
	}
}	
//	END ======================== MY A/C JOB .


//	MY A/C ARTICLE .
function MyAccountArticle(Classification)
{
	url="my-account-article.php?Classification="+Classification;
	//alert(url);
	ajax.reset();
	ajax.createAJAX();
	ajax.requestFile = url;	// Specifying which file to get
	ajax.onCompletion = SHOW_MyAccountArticle;	// Specify function that will be executed after file has been found
	ajax.runAJAX();
}	
function AjaxMyAccountArticle(limit,param,page)
{

	url="my-account-article.php?limit="+limit+"&param="+param+"&page="+page;
	//alert(url);
	ajax.reset();
	ajax.createAJAX();
	ajax.requestFile = url;	// Specifying which file to get
	ajax.onCompletion = SHOW_MyAccountArticle;	// Specify function that will be executed after file has been found
	ajax.runAJAX();
}	
function SHOW_MyAccountArticle()
{
	var content = ajax.response;
	//alert(content);
	var ArrayContent = new Array();
	var ArrayContent = content.split(':.:') ;
	//alert(ArrayContent[1] + ' == session_expired');
	if(ArrayContent[1] == 'session_expired')
	{
		window.location.href = 'login.php';
	}
	else
	{
		
		if(document.getElementById("ShowMyAccountArticle").style.display != 'none')
		{
			document.getElementById("ShowMyAccountArticle").style.display = 'none';
			document.getElementById("HideMyAccountArticle").style.display = '';
		}
	
		document.getElementById("DivMyAccountArticle").innerHTML='';
		document.getElementById("DivMyAccountArticle").innerHTML=content;
	}
}	
//	END ======================== MY A/C ARTICLE .


//	MY A/C NEWS .
function MyAccountNews(Classification)
{
	url="my-account-article.php?Classification="+Classification;
	//alert(url);
	ajax.reset();
	ajax.createAJAX();
	ajax.requestFile = url;	// Specifying which file to get
	ajax.onCompletion = SHOW_MyAccountNews;	// Specify function that will be executed after file has been found
	ajax.runAJAX();
}	
function AjaxMyAccountNews(limit,param,page)
{

	url="my-account-article.php?limit="+limit+"&param="+param+"&page="+page;
	//alert(url);
	ajax.reset();
	ajax.createAJAX();
	ajax.requestFile = url;	// Specifying which file to get
	ajax.onCompletion = SHOW_MyAccountNews;	// Specify function that will be executed after file has been found
	ajax.runAJAX();
}	
function SHOW_MyAccountNews()
{
	var content = ajax.response;
	//alert(content);
	var ArrayContent = new Array();
	var ArrayContent = content.split(':.:') ;
	//alert(ArrayContent[1] + ' == session_expired');
	if(ArrayContent[1] == 'session_expired')
	{
		window.location.href = 'login.php';
	}
	else
	{
		
		if(document.getElementById("ShowMyAccountNews").style.display != 'none')
		{
			document.getElementById("ShowMyAccountNews").style.display = 'none';
			document.getElementById("HideMyAccountNews").style.display = '';
		}
	
		document.getElementById("DivMyAccountNews").innerHTML='';
		document.getElementById("DivMyAccountNews").innerHTML=content;
	}
}	
//	END ======================== MY A/C NEWS .


//	MY A/C PROJECT .
function MyAccountProject(Classification)
{
	url="my-account-job.php?Classification="+Classification;
	//alert(url);
	ajax.reset();
	ajax.createAJAX();
	ajax.requestFile = url;	// Specifying which file to get
	ajax.onCompletion = SHOW_MyAccountProject;	// Specify function that will be executed after file has been found
	ajax.runAJAX();
}	
function AjaxMyAccountProject(limit,param,page)
{

	url="my-account-job.php?limit="+limit+"&param="+param+"&page="+page;
	//alert(url);
	ajax.reset();
	ajax.createAJAX();
	ajax.requestFile = url;	// Specifying which file to get
	ajax.onCompletion = SHOW_MyAccountProject;	// Specify function that will be executed after file has been found
	ajax.runAJAX();
}	
function SHOW_MyAccountProject()
{
	var content = ajax.response;
	//alert(content);
	var ArrayContent = new Array();
	var ArrayContent = content.split(':.:') ;
	//alert(ArrayContent[1] + ' == session_expired');
	if(ArrayContent[1] == 'session_expired')
	{
		window.location.href = 'login.php';
	}
	else
	{
		
		if(document.getElementById("ShowMyAccountProject").style.display != 'none')
		{
			document.getElementById("ShowMyAccountProject").style.display = 'none';
			document.getElementById("HideMyAccountProject").style.display = '';
		}
	
		document.getElementById("DivMyAccountProject").innerHTML='';
		document.getElementById("DivMyAccountProject").innerHTML=content;
	}
}	
//	END ======================== MY A/C PROJECT .


//	MY A/C EVENT .
function MyAccountEvent(Classification)
{
	url="my-account-event.php?Classification="+Classification;
	//alert(url);
	ajax.reset();
	ajax.createAJAX();
	ajax.requestFile = url;	// Specifying which file to get
	ajax.onCompletion = SHOW_MyAccountEvent;	// Specify function that will be executed after file has been found
	ajax.runAJAX();
}	
function AjaxMyAccountEvent(limit,param,page)
{

	url="my-account-event.php?limit="+limit+"&param="+param+"&page="+page;
	//alert(url);
	ajax.reset();
	ajax.createAJAX();
	ajax.requestFile = url;	// Specifying which file to get
	ajax.onCompletion = SHOW_MyAccountEvent;	// Specify function that will be executed after file has been found
	ajax.runAJAX();
}	
function SHOW_MyAccountEvent()
{
	var content = ajax.response;
	//alert(content);
	var ArrayContent = new Array();
	var ArrayContent = content.split(':.:') ;
	//alert(ArrayContent[1] + ' == session_expired');
	if(ArrayContent[1] == 'session_expired')
	{
		window.location.href = 'login.php';
	}
	else
	{
		
		if(document.getElementById("ShowMyAccountEvent").style.display != 'none')
		{
			document.getElementById("ShowMyAccountEvent").style.display = 'none';
			document.getElementById("HideMyAccountEvent").style.display = '';
		}
	
		document.getElementById("DivMyAccountEvent").innerHTML='';
		document.getElementById("DivMyAccountEvent").innerHTML=content;
	}
}	
//	END ======================== MY A/C EVENT .


//	MY A/C EVENTAPPROVAL .
function MyAccountEventApproval(PromoteMode)
{
	url="my-account-event-promoting.php?PromoteMode="+PromoteMode;
	//alert(url);
	ajax.reset();
	ajax.createAJAX();
	ajax.requestFile = url;	// Specifying which file to get
	ajax.onCompletion = SHOW_MyAccountEventApproval;	// Specify function that will be executed after file has been found
	ajax.runAJAX();
}	
function AjaxMyAccountEventApproval(limit,param,page)
{

	url="my-account-event-promoting.php?limit="+limit+"&param="+param+"&page="+page;
	//alert(url);
	ajax.reset();
	ajax.createAJAX();
	ajax.requestFile = url;	// Specifying which file to get
	ajax.onCompletion = SHOW_MyAccountEvent;	// Specify function that will be executed after file has been found
	ajax.runAJAX();
}	
function SHOW_MyAccountEventApproval()
{
	var content = ajax.response;
	//alert(content);
	var ArrayContent = new Array();
	var ArrayContent = content.split(':.:') ;
	//alert(ArrayContent[1] + ' == session_expired');
	if(ArrayContent[1] == 'session_expired')
	{
		window.location.href = 'login.php';
	}
	else
	{
		
		if(document.getElementById("ShowMyAccountEventApproval").style.display != 'none')
		{
			document.getElementById("ShowMyAccountEventApproval").style.display = 'none';
			document.getElementById("HideMyAccountEventApproval").style.display = '';
		}
	
		document.getElementById("DivMyAccountEventApproval").innerHTML='';
		document.getElementById("DivMyAccountEventApproval").innerHTML=content;
	}
}	
//	END ======================== MY A/C EVENTAPPROVAL .


//	MY A/C EVENTPROMOTING .
function MyAccountEventPromoting(PromoteMode)
{
	url="my-account-event-promoting.php?PromoteMode="+PromoteMode;
	//alert(url);
	ajax.reset();
	ajax.createAJAX();
	ajax.requestFile = url;	// Specifying which file to get
	ajax.onCompletion = SHOW_MyAccountEventPromoting;	// Specify function that will be executed after file has been found
	ajax.runAJAX();
}	
function AjaxMyAccountEventPromoting(limit,param,page)
{

	url="my-account-event-promoting.php?limit="+limit+"&param="+param+"&page="+page;
	//alert(url);
	ajax.reset();
	ajax.createAJAX();
	ajax.requestFile = url;	// Specifying which file to get
	ajax.onCompletion = SHOW_MyAccountEvent;	// Specify function that will be executed after file has been found
	ajax.runAJAX();
}	
function SHOW_MyAccountEventPromoting()
{
	var content = ajax.response;
	//alert(content);
	var ArrayContent = new Array();
	var ArrayContent = content.split(':.:') ;
	//alert(ArrayContent[1] + ' == session_expired');
	if(ArrayContent[1] == 'session_expired')
	{
		window.location.href = 'login.php';
	}
	else
	{
		
		if(document.getElementById("ShowMyAccountEventPromoting").style.display != 'none')
		{
			document.getElementById("ShowMyAccountEventPromoting").style.display = 'none';
			document.getElementById("HideMyAccountEventPromoting").style.display = '';
		}
	
		document.getElementById("DivMyAccountEventPromoting").innerHTML='';
		document.getElementById("DivMyAccountEventPromoting").innerHTML=content;
	}
}	
//	END ======================== MY A/C EVENTPROMOTING .

//	ON MOUSE OVER-OUT IMAGE CHANGE ON DESCRIPTION PAGE.
function ChangeMainImage(OrgImg,SmallImg,ChangeID,EventMode)
{
	//alert(OrgImg + ':' + SmallImg + ':' + ChangeID + ':' + EventMode);
	
	var OrgImgVal = document.getElementById(OrgImg).value;
	var SmallImgVal = document.getElementById(SmallImg).value;
	//
	//alert(SmallImg + ':' + SmallImgVal);
	
	if(EventMode == 'Over')
		var ImgPath = "include/resize.php?pic=" + SmallImgVal + "&w=195&h=195";
	else
		if(OrgImgVal != '')
			var ImgPath = "include/resize.php?pic=" + OrgImgVal + "&w=195&h=195";
		else
			var ImgPath = "upload/nopic1.jpg";
	//alert(ImgPath);
	document.getElementById(ChangeID).src = ImgPath;
}	
//	END ======================== ON MOUSE OVER-OUT IMAGE CHANGE ON DESCRIPTION PAGE.

//	SHOW WARNING ON ATTEMP TO BUY TICKET WITHOUT LOGIN.
function BuyTicketWOlogin()
{
	if(confirm("To buy ticket you need to login. Click YES to proceed."))
	{
		return true;
	}
	else
		return false;
}
//	END ======================== SHOW WARNING ON ATTEMP TO BUY TICKET WITHOUT LOGIN.

//	SHOW WARNING ON ATTEMP TO BUY TICKET WITHOUT LOGIN.
function AddGuestListChk()
{
	
	var ListName = document.getElementById('ListName').value;
	if(ListName =='')
	{
		alert("Please Enter Proper Value in ListName");
		document.getElementById('ListName').focus();
		return false;
	}
	var TotalGuest = document.getElementById('TotalGuest').value;
	if(TotalGuest =='' || (isNaN(TotalGuest) == true))
	{
		alert("Please Enter Proper Value in Total Guest");
		document.getElementById('TotalGuest').focus();
		return false;
	}
	var DiscountPercentage = document.getElementById('DiscountPercentage').value;
	if(DiscountPercentage =='' || (isNaN(DiscountPercentage) == true))
	{
		alert("Please Enter Proper Value in Discount Percentage");
		document.getElementById('DiscountPercentage').focus();
		return false;
	}
	var CommissionPercentage = document.getElementById('CommissionPercentage').value;
	if(CommissionPercentage =='' || (isNaN(CommissionPercentage) == true))
	{
		alert("Please Enter Proper Value in Commission Percentage");
		document.getElementById('CommissionPercentage').focus();
		return false;
	}
}
//	END ======================== SHOW WARNING ON ATTEMP TO BUY TICKET WITHOUT LOGIN.

//	ADD COUNTRY-STATE-CITY BY USER.
function AddStateCityUser(AddNew,Mode,DisplayDiv,SiteSection)
{
	var ParentID = document.getElementById(Mode).options[document.getElementById(Mode).selectedIndex].value;
	var	AddNew = document.getElementById(AddNew).value;
	if(ParentID == '')
	{
		alert('Please Select '+ Mode +' First');
		return false;
	}
	if(trim(AddNew) == '')
	{
		alert('Please Add Text');
		return false;
	}
	
	if(SiteSection == 'AdminSection')
		var Path = '../../';
	else
	{
		document.getElementById('AddState').value = '';
		document.getElementById('AddCity').value = '';
	 	var Path = '';
	}
	
	url = Path+'country-state-city.php?ID='+ParentID+'&Mode='+Mode+'&DisplayDiv='+DisplayDiv+'&SiteSection='+SiteSection+'&AddNew='+AddNew;
	//alert(url);
	ajax.reset();
	ajax.createAJAX();
	ajax.method = "POST";
	ajax.requestFile = url;	// Specifying which file to get
	ajax.onCompletion = SHOW_AddStateCityUser;	// Specify function that will be executed after file has been found
	ajax.runAJAX();	
}
function SHOW_AddStateCityUser()
{
	var content = ajax.response;
	//alert(content);
	
	var ArrayContent = new Array();
	var ArrayContent = content.split('^|^') ;
	
	//document.getElementById(ArrayContent[1]).innerHTML = '';
	document.getElementById(ArrayContent[1]).innerHTML = ArrayContent[0];
	if(ArrayContent[2] == 'UserSection')
	{
		alert('You Have Added Location Successfully');
		document.getElementById('AddState').value = '';
		document.getElementById('AddCity').value = '';
	}
}
//	END ======================== ADD COUNTRY-STATE-CITY BY USER.

//	SHOW VENUE ADD FORM.
function ShowVenueAddForm(ID,PageName)
{
	if(ID == 0)
		ID = '';
	url="venues-add.php?ID="+ID+"&PageName="+PageName;
	//alert(url);
	ajax.reset();
	ajax.createAJAX();
	ajax.requestFile = url;	// Specifying which file to get
	ajax.onCompletion = SHOW_ShowVenueAddForm;	// Specify function that will be executed after file has been found
	ajax.runAJAX();
}	
function SHOW_ShowVenueAddForm()
{
	var content = ajax.response;
	//alert(content);
	document.getElementById("DivVenueAddForm").innerHTML='';
	document.getElementById("DivVenueAddForm").innerHTML=content;
}	
//	END ======================== SHOW VENUE ADD FORM.

//	ADD VENUE .
function VenueAdd()
{
	var PageName = document.getElementById('PageName').value;
	
	var Name = document.getElementById('Name').value;
	if(Name =='' )
	{
		alert("Please Enter Name");
		document.getElementById('Name').focus();
		return false;
	}

	var Address = document.getElementById('Address').value;
	if(Address =='')
	{
		alert("Please Enter Address");
		document.getElementById('Address').focus();
		return false;
	}

	var NearestTube = document.getElementById('NearestTube').value;
	if(NearestTube =='')
	{
		alert("Please Enter NearestTube");
		document.getElementById('NearestTube').focus();
		return false;
	}
	
	var Phone = document.getElementById('Phone').value;
	if(Phone =='')
	{
		alert("Please Enter Phone");
		document.getElementById('Phone').focus();
		return false;
	}

	var Details = document.getElementById('Details').value;
	if(Details =='')
	{
		alert("Please Enter Details");
		document.getElementById('Details').focus();
		return false;
	}
	
	if(PageName == 'ViewPage')
	{
		var Capacity = document.getElementById('Capacity').value;
		if(Capacity =='')
		{
			alert("Please Enter Capacity");
			document.getElementById('Capacity').focus();
			return false;
		}
		if(checknumber(Capacity) == false)
		{
			document.getElementById("Capacity").focus();
			return false;
		}
	}
	else
	{
		var Capacity = document.getElementById('VenueCapacity').value;
		if(Capacity =='')
		{
			alert("Please Enter VenueCapacity");
			document.getElementById('VenueCapacity').focus();
			return false;
		}
		if(checknumber(Capacity) == false)
		{
			document.getElementById("VenueCapacity").focus();
			return false;
		}
	}
	var Lighting = document.getElementById('Lighting').value;
	if(Lighting =='')
	{
		alert("Please Enter Equipments");
		document.getElementById('Lighting').focus();
		return false;
	}
	
	var DoorPolicy = document.getElementById('DoorPolicy').value;
	if(DoorPolicy =='')
	{
		alert("Please Enter DoorPolicy");
		document.getElementById('DoorPolicy').focus();
		return false;
	}

	var Directions = document.getElementById('Directions').value;
	if(Directions =='')
	{
		alert("Please Enter Directions");
		document.getElementById('Directions').focus();
		return false;
	}
	
	var MapLink = document.getElementById('MapLink').value;
	if(MapLink =='')
	{
		alert("Please Enter MapLink");
		document.getElementById('MapLink').focus();
		return false;
	}
	
	var Status = '';
	var StatusY = document.getElementById("StatusY");
	var StatusN = document.getElementById("StatusN");
	if(StatusY.checked) Status = StatusY.value;
	if(StatusN.checked) Status = StatusN.value;
	if(Status=='')
	{
		alert('Please Select Status');
		return false;
	}
	var ID = document.getElementById('EventVenueID').value;
	
	if(ID != '' && ID > 0)
		var PostAction = 'EditPost';
	else
		var PostAction = 'AddPost';
	
	if(PageName == 'ViewPage')
	{
	}
		var Country = document.getElementById("Country").options[document.getElementById("Country").selectedIndex].value;
		if(Country=='')
		{
			alert('Please Select A Country');
			document.getElementById("Country").focus();
			return false;
		}
		
		var State = document.getElementById("State").options[document.getElementById("State").selectedIndex].value;
		if(State=='')
		{
			alert('Please Select A State');
			document.getElementById("State").focus();
			return false;
		}
	
		var City = document.getElementById("City").options[document.getElementById("City").selectedIndex].value;
		if(City=='')
		{
			alert('Please Select A City');
			document.getElementById("City").focus();
			return false;
		}

	url="venues-add.php?Name="+Name+"&Address="+Address+"&NearestTube="+NearestTube+"&Phone="+Phone+"&Capacity="+Capacity+"&Lighting="+Lighting+"&DoorPolicy="+DoorPolicy+"&Directions="+Directions+"&CountryID="+Country+"&StateID="+State+"&CityID="+City+"&ID="+ID+"&PostAction="+PostAction+"&Status="+Status+"&Details="+Details+"&MapLink="+MapLink+"&PageName="+PageName;
	//alert(url);
	ajax.requestFile = url;	// Specifying which file to get
	ajax.onCompletion = SHOW_VenueAdd;	// Specify function that will be executed after file has been found
	ajax.runAJAX();
	
}


function SHOW_VenueAdd()
{
	var content = ajax.response;
	//alert('::'+content+'::');
	var ResponseContent = new Array();
	var ResponseContent = content.split('::') ;
	if(ResponseContent[1] != '' && ResponseContent[1] > 0 && ResponseContent[0] == 'ViewPage')
	{
		window.location.href = 'venue-description.php?ID='+ResponseContent[1];
	}
	else
		SearchVenues('Venue','DivSearchVenuesResult','UserSection');
}	
//	END ======================== ADD VENUE.



//	SELECT NAKE - MODEL .
function OnChangeMakeModel(Obj,Mode,DisplayDiv,SiteSection,DDID) 
{
	if(SiteSection == 'AdminSection')
		var Path = '../../';
	else
	 	var Path = '';
	
	var ID = Obj.value;
	url = Path+'make-model.php?ID='+ID+'&Mode='+Mode+'&DisplayDiv='+DisplayDiv+'&SiteSection='+SiteSection+'&DDID='+DDID;
	//alert(url);
	ajax.reset();
	ajax.createAJAX();
	ajax.method = "POST";
	ajax.requestFile = url;	// Specifying which file to get
	ajax.onCompletion = SHOW_OnChangeMakeModel;	// Specify function that will be executed after file has been found
	ajax.runAJAX();	
} 
function SHOW_OnChangeMakeModel()
{
	var content = ajax.response;
	//alert(content);
	
	var ArrayContent = new Array();
	var ArrayContent = content.split('^|^') ;
	
	//document.getElementById(ArrayContent[1]).innerHTML = '';
	document.getElementById(ArrayContent[1]).innerHTML = ArrayContent[0];
}
//	END ======================== SELECT MAKE - MODEL .


//	TOP SERACH SECTION 
function PartsQuickSearchForm(obj)
{

	var SearchYear = document.getElementById("SearchYear").options[document.getElementById("SearchYear").selectedIndex].value;
	if(SearchYear < 1)
	{
		alert('Please Select A Year');
		document.getElementById("SearchYear").focus();
		return false;
	}
	
	var SearchMakeID = document.getElementById("SearchMakeID").options[document.getElementById("SearchMakeID").selectedIndex].value;
	if(SearchMakeID < 1)
	{
		alert('Please Select A Make');
		document.getElementById("SearchMakeID").focus();
		return false;
	}
	
	var SearchModel = document.getElementById("SearchModelAjax").options[document.getElementById("SearchModelAjax").selectedIndex].value;
	if(SearchModel < 1)
	{
		alert('Please Select A Model');
		document.getElementById("SearchModelAjax").focus();
		return false;
	}
	document.getElementById("SearchModelID").value = SearchModel;
	
}
//	End - TOP SERACH SECTION 


//	ADVANCE SERACH SECTION 
function PartsQuickSearchFormAdv(obj)
{

//	var SearchModel = document.getElementById("SearchModelAjaxAdv").options[document.getElementById("SearchModelAjaxAdv").selectedIndex].value;
//	document.getElementById("SearchModelIDAdv").value = SearchModel;
//
//	var SearchSubCat = document.getElementById("SearchSubCatAjaxAdv").options[document.getElementById("SearchSubCatAjaxAdv").selectedIndex].value;
//	document.getElementById("SearchSubCatIDAdv").value = SearchSubCat;
	
	var SearchPackage = document.getElementById("SearchPackage").checked;
	if(SearchPackage)
	{
		obj.action = 'package-listing.php';
	}
	var PartsNo = document.getElementById("PartsNo").value;
	if(PartsNo == '')
	{
		alert('Please Enter Parts No');
		return false;
	}
	
//	var PartsNo = document.getElementById("PartsNo").checked;
//	if(PartsNo == '')
//	{
//		alert('Please fil up the PartsNo');
//		return false;
//	}
	
}
//	End - ADVANCE SERACH SECTION 


