﻿﻿function InsertLog(ModuleName, Mode) {
    nocache = Math.random();
    params = "&ModuleName=" + encodeURIComponent(ModuleName);
    params += "&Action=" + encodeURIComponent(Mode);

    http.open('get', '/controller/logdetail.php?Mode=Insert&nocache = ' + nocache + params);
    http.onreadystatechange = LogInsertStatus;
    http.send(null);
}
function LogInsertStatus() { }


function createObject() 
{
    var request_type;
    var browser = navigator.appName;
    if (browser == "Microsoft Internet Explorer") {
        request_type = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else {
        request_type = new XMLHttpRequest();
    }
    return request_type;
}

var http = createObject();


function SelectedTextBox()
{
    var txt = document.getElementById(arguments[0]);
    if(txt)
    {
        if(arguments[1])
        {
            if(txt.value=="")
            {
                if(arguments[1]=="focus")
                {
                    txt.className ="input_num_textbox_focus";
                    txt.value="";
                }
                else
                {
                    txt.className ="input_num_textbox";
                    
                }
            }
           else
            {
                txt.className = "input_num_textbox";
            }
        }
    }
}

function SelectTextBox()
{
    var cTxt = document.getElementById(arguments[0]);
    if(arguments[2]=="leasetxt")
    {
        if(arguments[1]=="focus")
        {
            cTxt.className ="input_lease_textbox_focus";
            if(cTxt.value==cTxt.title)
            cTxt.value="";
        }
        else
            cTxt.className ="input_lease_textbox_onblur";
    }
    if(arguments[2]=="longtxt")
    {
        if(arguments[1]=="focus")
        {
            cTxt.className ="input_long_textbox_focus";
            if(cTxt.value==cTxt.title)
            cTxt.value="";
        }
        else
            cTxt.className ="input_long_textbox_onblur";
    }
    if(arguments[2]=="buytxt")
    {
        if(arguments[1]=="focus")
        {
            cTxt.className ="input_buy_long_textbox_focus";
            if(cTxt.value==cTxt.title)
            cTxt.value="";
        }
        else
            cTxt.className ="input_buy_long_textbox_onblur";
    }
    if(arguments[2]=="txt")
    {
        if(arguments[1]=="focus")
        {
            cTxt.className ="input_textbox_focus";
            if(cTxt.value==cTxt.title)
            cTxt.value="";
        }
        else
            cTxt.className ="input_textbox_onblur";
    }
    else if(arguments[2]=="txtarea")
    {
        if(arguments[1]=="focus")
        {
            cTxt.className ="textarea_focus";
            if(cTxt.value==cTxt.title)
            cTxt.value="";
        }
        else
        {
            cTxt.className ="textarea_onblur";
        }
    }
    else if(arguments[2]=="txtarea1")
    {
        if(arguments[1]=="focus")
        {
            cTxt.className ="textarea_focus1";
            if(cTxt.value==cTxt.title)
            cTxt.value="";
        }
        else
        {
            cTxt.className ="textarea_onblur1";
        }
    }
    else if(arguments[2]=="txtarea_admin")
    {
        if(arguments[1]=="focus")
        {
            cTxt.className ="textarea_admin_focus1";
            if(cTxt.value==cTxt.title)
            cTxt.value="";
        }
        else
        {
            cTxt.className ="textarea_admin_onblur1";
        }
    }
    else if(arguments[2]=="smalltxt")
    {
        if(arguments[1]=="focus")
        {
            cTxt.className ="input_small_num_focus";
            if(cTxt.value==cTxt.title)
            cTxt.value="";
        }
        else
        {
            cTxt.className ="input_small_num_onblur";
        }
    }
    else if(arguments[2]=="txtamt")
    {
        if(arguments[1]=="focus")
        {
            cTxt.className ="input_num_textbox_focus";
            if(cTxt.value==cTxt.title)
            cTxt.value="";
        }
        else
        {
            cTxt.className ="input_num_textbox_onblur";
        }
    }
}


function SelectedTextBox_contact()
{
    var txt = document.getElementById(arguments[0]);
    var lab=document.getElementById(arguments[1]);
    if(txt)
    {
        if(arguments[2])
        {
            if(arguments[2]=="focus")
            {
                txt.className = "input_box_Num_focus_contact";
                 lab.className="e_lblfocus";
            }
            else
            {
                txt.className = "input_box_Num_contact";
                lab.className="e_lblblur";
            }
        }
    }
}

function tablevisible()
{
    var obj=document.getElementById('tabresult');
    obj.style.visibility="visible";
}


function SelectedNumBox()
{
    var txt = document.getElementById(arguments[0]);
    var lab=document.getElementById(arguments[1]);
    if(txt)
    {
        if(arguments[2])
        {
            if(arguments[2]=="focus")
            {
                txt.className = "input_combobox_focus";
                lab.className="e_lblfocus";
            }
            else
            {
                txt.className = "input_combobox";
                 lab.className="e_lblblur";
            }

        }
       
    }
}

function SelectedSmallNumBox() /* Amortization Small combo box funtion-Pandi*/
{
    var txt = document.getElementById(arguments[0]);
    var lab=document.getElementById(arguments[1]);
    if(txt)
    {
        if(arguments[2])
        {
            if(arguments[2]=="focus")
            {
                txt.className = "small_combobox_focus";
            }
            else
            {
                txt.className = "small_combobox";
                 
            }

        }
       
    }
}


function fncload()
{
    var ctrl = document.getElementById(arguments[0]);
    ctrl.focus();
}
    
    
function chkInteger()
    {	
           if(window.event.keyCode < 48 || window.event.keyCode>57)
           {
           if(event.keyCode == 46)
           {
            event.returnValue=true;			
            }
           else if (event.keyCode == 13) 
           {
             document.getElementById('btnCalculate').click();
             event.returnValue=true;			
             }
             else
             event.returnValue=false;			
          }
    }

function contDetails()
{

  if ((document.getElementById('Contacttable').style.display == 'none'))
      {
        document.getElementById('Contacttable').style.display = 'inline';
        document.getElementById('conimage').src='images/pfeil_auf.jpg';
      } else {
        document.getElementById('Contacttable').style.display = 'none';
        document.getElementById('conimage').src='images/pfeil_zu.jpg ';
      } 
}


function AdditionalDetails(itemID)
{

  if ((document.getElementById(itemID).style.display == 'none'))
      {
        document.getElementById(itemID).style.display = 'inline';
        //document.getElementById('addimage').src='images/pfeil_auf.jpg';
      } else {
        document.getElementById(itemID).style.display = 'none';
        // document.getElementById('addimage').src='images/pfeil_zu.jpg';
      } 
}

function BackDisabled()
{
    javascript:window.history.forward(1);
}


function IsValidStartEndDate(cStartDate, cEndDate) {
    if (cStartDate != "" && cEndDate != "") 
    {
        aSdt = cStartDate.split('-');
        dtSdt = new Date();
        dtSdt.setDate(aSdt[0]);
        dtSdt.setMonth(aSdt[1]);
        dtSdt.setFullYear(aSdt[2]);

        aEdt = cEndDate.split('-');
        dtEdt = new Date();
        dtEdt.setDate(aEdt[0]);
        dtEdt.setMonth(aEdt[1]);
        dtEdt.setFullYear(aEdt[2]);

        if (dtSdt > dtEdt) 
        {
            alert("End date should be greater than the Start date!");
            return false;
        }
        else
            return true;
    }
    else
        return true;
}
   




// Menu and Sub Menu Scripting .....

var cssdropdown={
disappeardelay: 250, //set delay in miliseconds before menu disappears onmouseout
dropdownindicator: '<img src="/images/down.gif" border="0" />', //specify full HTML to add to end of each menu item with a drop down menu
enablereveal: [true, 5], //enable swipe effect? [true/false, steps (Number of animation steps. Integer between 1-20. Smaller=faster)]
enableiframeshim: 1, //enable "iframe shim" in IE5.5 to IE7? (1=yes, 0=no)

dropmenuobj: null, asscmenuitem: null, domsupport: document.all || document.getElementById, standardbody: null, iframeshimadded: false, revealtimers: {},

getposOffset:function(what, offsettype){
	var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
	var parentEl=what.offsetParent;
	while (parentEl!=null){
		totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
		parentEl=parentEl.offsetParent;
	}
	return totaloffset;
},

css:function(el, targetclass, action){
	var needle=new RegExp("(^|\\s+)"+targetclass+"($|\\s+)", "ig")
	if (action=="check")
		return needle.test(el.className)
	else if (action=="remove")
		el.className=el.className.replace(needle, "")
	else if (action=="add" && !needle.test(el.className))
		el.className+=" "+targetclass
},

showmenu:function(dropmenu, e){
	if (this.enablereveal[0]){
		if (!dropmenu._trueheight || dropmenu._trueheight<10)
			dropmenu._trueheight=dropmenu.offsetHeight
		clearTimeout(this.revealtimers[dropmenu.id])
		dropmenu.style.height=dropmenu._curheight=0
		dropmenu.style.overflow="hidden"
		dropmenu.style.visibility="visible"
		this.revealtimers[dropmenu.id]=setInterval(function(){cssdropdown.revealmenu(dropmenu)}, 10)
	}
	else{
		dropmenu.style.visibility="visible"
	}
	this.css(this.asscmenuitem, "selected", "add")
},

revealmenu:function(dropmenu, dir){
	var curH=dropmenu._curheight, maxH=dropmenu._trueheight, steps=this.enablereveal[1]
	if (curH<maxH){
		var newH=Math.min(curH, maxH)
		dropmenu.style.height=newH+"px"
		dropmenu._curheight= newH + Math.round((maxH-newH)/steps) + 1
	}
	else{ //if done revealing menu
		dropmenu.style.height="auto"
		dropmenu.style.overflow="hidden"
		clearInterval(this.revealtimers[dropmenu.id])
	}
},

clearbrowseredge:function(obj, whichedge){
	var edgeoffset=0
	if (whichedge=="rightedge"){
		var windowedge=document.all && !window.opera? this.standardbody.scrollLeft+this.standardbody.clientWidth-15 : window.pageXOffset+window.innerWidth-15
		var dropmenuW=this.dropmenuobj.offsetWidth
		if (windowedge-this.dropmenuobj.x < dropmenuW)  //move menu to the left?
			edgeoffset=dropmenuW-obj.offsetWidth
	}
	else{
		var topedge=document.all && !window.opera? this.standardbody.scrollTop : window.pageYOffset
		var windowedge=document.all && !window.opera? this.standardbody.scrollTop+this.standardbody.clientHeight-15 : window.pageYOffset+window.innerHeight-18
		var dropmenuH=this.dropmenuobj._trueheight
		if (windowedge-this.dropmenuobj.y < dropmenuH){ //move up?
			edgeoffset=dropmenuH+obj.offsetHeight
			if ((this.dropmenuobj.y-topedge)<dropmenuH) //up no good either?
				edgeoffset=this.dropmenuobj.y+obj.offsetHeight-topedge
		}
	}
	return edgeoffset
},

dropit:function(obj, e, dropmenuID){
	if (this.dropmenuobj!=null) //hide previous menu
		this.hidemenu() //hide menu
	this.clearhidemenu()
	this.dropmenuobj=document.getElementById(dropmenuID) //reference drop down menu
	this.asscmenuitem=obj //reference associated menu item
	this.showmenu(this.dropmenuobj, e)
	this.dropmenuobj.x=this.getposOffset(obj, "left")
	this.dropmenuobj.y=this.getposOffset(obj, "top")
	this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge")+"px"
	this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+1+"px"
	this.positionshim() //call iframe shim function
},

positionshim:function(){ //display iframe shim function
	if (this.iframeshimadded){
		if (this.dropmenuobj.style.visibility=="visible"){
			this.shimobject.style.width=this.dropmenuobj.offsetWidth+"px"
			this.shimobject.style.height=this.dropmenuobj._trueheight+"px"
			this.shimobject.style.left=parseInt(this.dropmenuobj.style.left)+"px"
			this.shimobject.style.top=parseInt(this.dropmenuobj.style.top)+"px"
			this.shimobject.style.display="block"
		}
	}
},

hideshim:function(){
	if (this.iframeshimadded)
		this.shimobject.style.display='none'
},

isContained:function(m, e){
	var e=window.event || e
	var c=e.relatedTarget || ((e.type=="mouseover")? e.fromElement : e.toElement)
	while (c && c!=m)try {c=c.parentNode} catch(e){c=m}
	if (c==m)
		return true
	else
		return false
},

dynamichide:function(m, e){
	if (!this.isContained(m, e)){
		this.delayhidemenu()
	}
},

delayhidemenu:function(){
	this.delayhide=setTimeout("cssdropdown.hidemenu()", this.disappeardelay) //hide menu
},

hidemenu:function(){
	this.css(this.asscmenuitem, "selected", "remove")
	this.dropmenuobj.style.visibility='hidden'
	this.dropmenuobj.style.left=this.dropmenuobj.style.top="-1000px"
	this.hideshim()
},

clearhidemenu:function(){
	if (this.delayhide!="undefined")
		clearTimeout(this.delayhide)
},

addEvent:function(target, functionref, tasktype){
	if (target.addEventListener)
		target.addEventListener(tasktype, functionref, false);
	else if (target.attachEvent)
		target.attachEvent('on'+tasktype, function(){return functionref.call(target, window.event)});
},

startchrome:function(){
	if (!this.domsupport)
		return
	this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
	for (var ids=0; ids<arguments.length; ids++){
		var menuitems=document.getElementById(arguments[ids]).getElementsByTagName("a")
		for (var i=0; i<menuitems.length; i++){
			if (menuitems[i].getAttribute("rel")){
				var relvalue=menuitems[i].getAttribute("rel")
				var asscdropdownmenu=document.getElementById(relvalue)
				this.addEvent(asscdropdownmenu, function(){cssdropdown.clearhidemenu()}, "mouseover")
				this.addEvent(asscdropdownmenu, function(e){cssdropdown.dynamichide(this, e)}, "mouseout")
				this.addEvent(asscdropdownmenu, function(){cssdropdown.delayhidemenu()}, "click")
				try{
					menuitems[i].innerHTML=menuitems[i].innerHTML+" "+this.dropdownindicator
				}catch(e){}
				this.addEvent(menuitems[i], function(e){ //show drop down menu when main menu items are mouse over-ed
					if (!cssdropdown.isContained(this, e)){
						var evtobj=window.event || e
						cssdropdown.dropit(this, evtobj, this.getAttribute("rel"))
					}
				}, "mouseover")
				this.addEvent(menuitems[i], function(e){cssdropdown.dynamichide(this, e)}, "mouseout") //hide drop down menu when main menu items are mouse out
				this.addEvent(menuitems[i], function(){cssdropdown.delayhidemenu()}, "click") //hide drop down menu when main menu items are clicked on
			}
		} //end inner for
	} //end outer for
	if (this.enableiframeshim && document.all && !window.XDomainRequest && !this.iframeshimadded){ //enable iframe shim in IE5.5 thru IE7?
		document.write('<IFRAME id="iframeshim" src="about:blank" frameBorder="0" scrolling="no" style="left:0; top:0; position:absolute; display:none;z-index:90; background: transparent;"></IFRAME>')
		this.shimobject=document.getElementById("iframeshim") //reference iframe object
		this.shimobject.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)'
		this.iframeshimadded=true
	}
} //end startchrome

}

// ...Menu and Sub Menu Scripting


//This is for emi calculator small text box by kasi

function SelectedTextBox_small() 
{
    var txt = document.getElementById(arguments[0]);
    var lab=document.getElementById(arguments[1]);
    if(txt)
    {
        if(arguments[1])
        {
            if(txt.value=="")
            {
                if(arguments[1]=="focus")
                {
                    txt.className ="smalltextbox_focus";
                    txt.value="";
                }
                else
                {
                    txt.className ="smalltextbox";
                }
            }
           else
            {
                txt.className = "smalltextbox";
            }
        }
    }
}

function AppendAdditionalAmount()
{
    var nAmount=5000;
    var cmbPriceRangeMinimum = document.getElementById("cmbPriceRangeMinimum");
    var cmbPriceRangeMaximum = document.getElementById("cmbPriceRangeMaximum");
    var j = 1 ; 
    
    if (!document.createEventObject){
        var MinArray = new Array();
        var MaxArray = new Array();
        var cmbPriceRangeMinimum = document.getElementById("cmbPriceRangeMinimum");
        var cmbPriceRangeMaximum = document.getElementById("cmbPriceRangeMaximum");
        for (i=0;i<cmbPriceRangeMinimum.options.length;i++)
        {
            MinArray.push(cmbPriceRangeMinimum.options[i].text);
        }
        MinArray.splice(0,1); 
        MinArray.unshift("20000","15000","10000","5000");
        MinArray.unshift("-- Select --");
        MinArray.sort(function(a,b){return a - b});
        MinArray.reverse();
        
        for (i=0;i<cmbPriceRangeMaximum.options.length;i++)
        {
            MaxArray.push(cmbPriceRangeMaximum.options[i].text);
        }
        
        MaxArray.splice(0,1); 
        MaxArray.unshift("20000","15000","10000","5000");
        MaxArray.unshift("-- Select --");
        MaxArray.sort(function(a,b){return a - b});
        MaxArray.reverse();
        
        cmbPriceRangeMinimum.options.length = 0;//removes all dropdown values
        cmbPriceRangeMaximum.options.length = 0;
        
        for(j=0;j<MinArray.length;j++)//reassigns the values
        {
            var oMinOptn = document.createElement("OPTION");
            oMinOptn.text = MinArray[j];
            oMinOptn.value = MinArray[j];
            cmbPriceRangeMinimum.options.add(oMinOptn,0);
            
        }
        
        for(j=0;j<MaxArray.length;j++)//reassigns the values
        {
            var oMaxOptn = document.createElement("OPTION");
            oMaxOptn.text = MaxArray[j];
            oMaxOptn.value = MaxArray[j];
            cmbPriceRangeMaximum.options.add(oMaxOptn,0);
        }
        cmbPriceRangeMinimum.selectedIndex = 0
        cmbPriceRangeMaximum.selectedIndex = 0
    }
    else{
        for (i=1; i<=4; i++) 
        {
            ocmbPriceRangeMinimumOption = document.createElement("OPTION");
            ocmbPriceRangeMinimumOption.text = unescape(nAmount);
            ocmbPriceRangeMinimumOption.value = nAmount;
            
            ocmbPriceRangeMaximumOption = document.createElement("OPTION");
            ocmbPriceRangeMaximumOption.text = unescape(nAmount);
            ocmbPriceRangeMaximumOption.value = nAmount;
            // If IE
            if (document.createEventObject){
            cmbPriceRangeMinimum.add(ocmbPriceRangeMinimumOption, j);
            cmbPriceRangeMaximum.add(ocmbPriceRangeMaximumOption, j);
            }
            ocmbPriceRangeMinimumOption = null;
            ocmbPriceRangeMaximumOption=null;
            j ++ ;
            nAmount=eval(nAmount)+eval(5000);
        }
    }
}

Array.prototype.remove = function(from, to) {
  var rest = this.slice((to || from) + 1 || this.length);
  this.length = from < 0 ? this.length + from : from;
  return this.push.apply(this, rest);
};


function RemovAdditionalAmount()
{
    
    var cmbPriceRangeMinimum = document.getElementById("cmbPriceRangeMinimum");
    var cmbPriceRangeMaximum = document.getElementById("cmbPriceRangeMaximum");
    var MinArray = new Array();
    var MaxArray = new Array();
    if(cmbPriceRangeMinimum.options.length >17){
        for (i=0;i<cmbPriceRangeMinimum.options.length;i++)
        {
            MinArray.push(cmbPriceRangeMinimum.options[i].text);
        }
        MinArray.remove(1,2);
        MinArray.remove(1,2);
        MinArray.reverse(); 
        
        for (i=0;i<cmbPriceRangeMaximum.options.length;i++)
        {
            MaxArray.push(cmbPriceRangeMaximum.options[i].text);
        }
        
        MaxArray.remove(1,2);
        MaxArray.remove(1,2);
        MaxArray.reverse(); 
        
        cmbPriceRangeMinimum.options.length = 0;//removes all dropdown values
        cmbPriceRangeMaximum.options.length = 0;

        for(j=0;j<MinArray.length;j++)//reassigns the values
        {
            var oMinOptn = document.createElement("OPTION");
            oMinOptn.text = MinArray[j];
            oMinOptn.value = MinArray[j];
            cmbPriceRangeMinimum.options.add(oMinOptn,0);
        }
        for(j=0;j<MaxArray.length;j++)//reassigns the values
        {
            var oMaxOptn = document.createElement("OPTION");
            oMaxOptn.text = MaxArray[j];
            oMaxOptn.value = MaxArray[j];
            cmbPriceRangeMaximum.options.add(oMaxOptn,0);
        }
        
        
        cmbPriceRangeMinimum.selectedIndex = 0
        cmbPriceRangeMaximum.selectedIndex = 0
    }
}

function SearchHeader() 
{
var sHTML="";
    sHTML= "<table border='0' cellpadding='0' cellspacing='0' class='search_bg'>";
        sHTML=sHTML+"<tr>";
            sHTML=sHTML+"<td align='center'>";
                sHTML=sHTML+"<table border='0' cellpadding='0' cellspacing='0'>";
                sHTML=sHTML+"<tr>";
                    sHTML=sHTML+"<td>";
                       sHTML=sHTML+"<a href='http://www.karaikudiproperties.com' target='blank'><img src='/images/logo_new.jpg' alt='Karaikudi Properties' style='width:250px;height:73px' border='0'/></a>";
                    sHTML=sHTML+"</td>";
                sHTML=sHTML+"</tr>";
                sHTML=sHTML+"</table>";
            sHTML=sHTML+"</td>";
            sHTML=sHTML+"<td class='search_bg_00'>";
            sHTML=sHTML+"</td>";
            sHTML=sHTML+" <td class='search_bg_01' style='padding-left: 15px'>";
                sHTML=sHTML+"<table cellpadding='0' cellspacing='0'>";
                sHTML=sHTML+"<tr>";
                    sHTML=sHTML+"<td>";
                        sHTML=sHTML+"<table border='0' cellpadding='0' cellspacing='0'>";
                            sHTML=sHTML+"<tr>";
                                sHTML=sHTML+"<td>";
                                    sHTML=sHTML+"<table border='0' cellpadding='0' cellspacing='0'>";
                                    sHTML=sHTML+"<tr>";
                                        sHTML=sHTML+"<td class='search_heading'>";
                                            sHTML=sHTML+"Search for :";
                                         sHTML=sHTML+"</td>";
                                         sHTML=sHTML+"<td class='search_ctrl_lbl'>";
                                            sHTML=sHTML+"<input title='Choose any one type' type='radio' id='optBuy' name='optType' value='Buy' onclick='RemovAdditionalAmount()'  />Buy";
                                         sHTML=sHTML+"</td>";
                                         sHTML=sHTML+"<td class='search_ctrl_lbl'>";
                                            sHTML=sHTML+"<input title='Choose any one type' type='radio' id='optSell' name='optType' value='Sell' onclick='RemovAdditionalAmount()'  />Sell";
                                         sHTML=sHTML+"</td>";
                                         sHTML=sHTML+"<td class='search_ctrl_lbl'>";
                                            sHTML=sHTML+"<input title='Choose any one type' type='radio' id='optRent' name='optType' value='Rent' onclick='AppendAdditionalAmount()'  />Rent";
                                         sHTML=sHTML+"</td>";
                                         sHTML=sHTML+"<td class='search_ctrl_lbl'>";
                                            sHTML=sHTML+"<input title='Choose any one type' type='radio' id='optLease' name='optType' value='Lease' onclick='RemovAdditionalAmount()'  />Lease";
                                         sHTML=sHTML+"</td>";
                                         sHTML=sHTML+"<td class='search_ctrl_lbl' style='padding-top: 1px;'>";
                                            sHTML = sHTML + "&nbsp;&nbsp;&nbsp;Price Range:&nbsp;Rs :";
                                         sHTML=sHTML+"</td>";
                                         sHTML=sHTML+"<td class='search_ctrl_lbl'>";
                                            sHTML = sHTML + "&nbsp;<select name='select' class='input_combobox_small' style='width: 111px'  id='cmbPriceRangeMinimum'>";
                                                sHTML=sHTML+"<option>-- Select --</option>";
                                                    sHTML=sHTML+"<option value='25000'>25000</option>";
                                                    sHTML = sHTML + "<option value='50000'>50000</option>";
                                                    sHTML=sHTML+"<option value='75000'>75000</option>";
                                                    sHTML = sHTML + "<option value='100000'>100000</option>";
                                                    sHTML = sHTML + "<option value='300000'>300000</option>";
                                                    sHTML = sHTML + "<option value='500000'>500000</option>";
                                                    sHTML = sHTML + "<option value='700000'>700000</option>";
                                                    sHTML = sHTML + "<option value='1000000'>1000000</option>";
                                                    sHTML = sHTML + "<option value='2000000'>2000000</option>";
                                                    sHTML = sHTML + "<option value='3000000'>3000000</option>";
                                                    sHTML = sHTML + "<option value='4000000'>4000000</option>";
                                                    sHTML = sHTML + "<option value='5000000'>5000000</option>";
                                                    sHTML = sHTML + "<option value='6000000'>6000000</option>";
                                                    sHTML = sHTML + "<option value='7000000'>7000000</option>";
                                                    sHTML = sHTML + "<option value='8000000'>8000000</option>";
                                                    sHTML = sHTML + "<option value='9000000'>9000000</option>";
                                                    sHTML = sHTML + "<optionvalue='10000000'>10000000</option>";
                                            sHTML=sHTML+"</select>";
                                            sHTML=sHTML+"&nbsp;to&nbsp;Rs :";
                                            sHTML = sHTML + "&nbsp;<select name='select2' class='input_combobox_small' style='width: 111px'  id='cmbPriceRangeMaximum'>";
                                                sHTML=sHTML+"<option>-- Select --</option>";
                                                sHTML = sHTML + "<option value='25000'>25000</option>";
                                                sHTML = sHTML + "<option value='50000'>50000</option>";
                                                sHTML = sHTML + "<option value='75000'>75000</option>";
                                                sHTML = sHTML + "<option value='100000'>100000</option>";
                                                sHTML = sHTML + "<option value='200000'>200000</option>";
                                                sHTML = sHTML + "<option value='400000'>400000</option>";
                                                sHTML = sHTML + "<option value='600000'>600000</option>";
                                                sHTML = sHTML + "<option value='800000'>800000</option>";
                                                sHTML = sHTML + "<option value='1000000'>1000000</option>";
                                                sHTML = sHTML + "<option value='2500000'>2500000</option>";
                                                sHTML = sHTML + "<option value='3500000'>3500000</option>";
                                                sHTML = sHTML + "<option value='4500000'>4500000</option>";
                                                sHTML = sHTML + "<option value='5500000'>5500000</option>";
                                                sHTML = sHTML + "<option value='6500000'>6500000</option>";
                                                sHTML = sHTML + "<option value='7500000'>7500000</option>";
                                                sHTML = sHTML + "<option value='8500000'>8500000</option>";
                                                sHTML = sHTML + "<option value='9500000'>9500000</option>";
                                                sHTML = sHTML + "<option value='10000000'> > 10000000</option>";
                                         sHTML=sHTML+"</select>";
                                      sHTML=sHTML+"</td>";
                                    sHTML=sHTML+"</tr>";
                                    sHTML=sHTML+"</table>";
                                sHTML=sHTML+"</td>";
                              sHTML=sHTML+"</tr>";
                              sHTML=sHTML+"<tr>";
                                sHTML=sHTML+"<td style='padding-left: 1px'>";
                                    sHTML=sHTML+"<table border='0' cellpadding='0' cellspacing='0'>";
                                    sHTML=sHTML+"<tr>";
                                        sHTML=sHTML+"<td class='search_ctrl_lbl'>";
                                            sHTML=sHTML+"Location, City, State :";
                                        sHTML=sHTML+"</td>";
                                    sHTML=sHTML+"<td>";
                                        sHTML=sHTML+"<input type='text' value='[ e.g. Burma Colony, Subramaniapuram, Karaikudi, Tamil Nadu ]' name='txtLocation' style='width: 250px;height:20px' class='input_textbox' id='txtLocation' onfocus='ClearSearchText(txtLocation)' />";
                                    sHTML=sHTML+"</td>";
                                    sHTML=sHTML+"<td class='search_ctrl_lbl'>";
                                        sHTML=sHTML+"&nbsp;Property Type:";
                                    sHTML=sHTML+"</td>";
                                    sHTML=sHTML+"<td align='left'>";
                                        sHTML=sHTML+"<select id='cmbPropertyType' class='input_combobox'  style='width: 174px'>";
                                        sHTML = sHTML + '<option value="0">--Select--</option>';
                                        sHTML = sHTML + '<option value="Warehouse/Godown">Warehouse/Godown</option>';
                                        sHTML = sHTML + '<option value="Apartments-flats">Apartments-flats</option>';
                                        sHTML = sHTML + '<option value="Individual-houses">Individual-houses</option>';
                                        sHTML = sHTML + '<option value="Villas">Villas</option>';
                                        sHTML = sHTML + '<option value="Plots/Land">Plots/Land</option>';
                                        sHTML = sHTML + '<option value="OfficeSpace">Office Space</option>';
                                        sHTML = sHTML + '<option value="Showrooms/Shops">Showrooms/Shops</option>';
                                        sHTML = sHTML + '<option value="Restaurant/Bar">Restaurant/Bar</option>';
                                        sHTML = sHTML + '<option value="Others">Others</option>';
                                        sHTML = sHTML + '<option value="Industrial Space">Industrial Space</option>';
                                        sHTML = sHTML + '<option value="Agricultural Land/Farm Land">Land/Farm Land</option>';
                                        sHTML=sHTML+"</select>";
                                    sHTML=sHTML+"</td>";
                                sHTML=sHTML+"</tr>";
                                sHTML=sHTML+"</table>";
                            sHTML=sHTML+"</td>";
                        sHTML=sHTML+"</tr>";
                        sHTML=sHTML+"</table>";
                    sHTML=sHTML+"</td>";
                    sHTML=sHTML+"<td>";
                    sHTML = sHTML + "<a href='#'><img src='../../images/btn_go.jpg' onclick='GoFunction()' id='btnSearch' style='height:45px;width:30px' border='0'/></a>&nbsp;";
                    sHTML=sHTML+"</td>";
                sHTML=sHTML+"</table>";
            sHTML=sHTML+"</td>";
            sHTML=sHTML+"<td class='search_bg_02'>";
            sHTML=sHTML+"</td>";
        sHTML=sHTML+"</tr>";
    sHTML=sHTML+"</table>";
    document.getElementById('searchHeader').innerHTML=sHTML;
}



function PropertyListSearchHeader() {
    var sHTML = "";
    sHTML = "<table border='0' cellpadding='0' cellspacing='0' class='search_bg'>";
    sHTML = sHTML + "<tr>";
    sHTML = sHTML + "<td align='center'>";
    sHTML = sHTML + "<table border='0' cellpadding='0' cellspacing='0'>";
    sHTML = sHTML + "<tr>";
    sHTML = sHTML + "<td class='logo'>";
    sHTML = sHTML + "</td>";
    sHTML = sHTML + "</tr>";
    sHTML = sHTML + "</table>";
    sHTML = sHTML + "</td>";
    sHTML = sHTML + "<td class='search_bg_00'>";
    sHTML = sHTML + "</td>";
    sHTML = sHTML + " <td class='search_bg_01' style='padding-left: 15px'>";
    sHTML = sHTML + "<table cellpadding='0' cellspacing='0'>";
    sHTML = sHTML + "<tr>";
    sHTML = sHTML + "<td>";
    sHTML = sHTML + "<table border='0' cellpadding='0' cellspacing='0'>";
    sHTML = sHTML + "<tr>";
    sHTML = sHTML + "<td>";
    sHTML = sHTML + "<table border='0' cellpadding='0' cellspacing='0'>";
    sHTML = sHTML + "<tr>";
    sHTML = sHTML + "<td class='search_heading'> <input id='hd' name='hd' type='hidden' value='34sd3$' />";
    sHTML = sHTML + "Search for :";
    sHTML = sHTML + "</td>";
    sHTML = sHTML + "<td class='search_ctrl_lbl'>";
    sHTML = sHTML + "<input title='Choose any one type' type='radio' id='optBuy' name='"+encode64('optType')+ "' value='"+encode64('Buy')+ "' onclick='RemovAdditionalAmount()'/>Buy";
    sHTML = sHTML + "</td>";
    sHTML = sHTML + "<td class='search_ctrl_lbl'>";
    sHTML = sHTML + "<input title='Choose any one type' type='radio' id='optSell' name='"+encode64('optType')+ "' value='"+encode64('Sell')+ "' onclick='RemovAdditionalAmount()'/>Sell";
    sHTML = sHTML + "</td>";
    sHTML = sHTML + "<td class='search_ctrl_lbl'>";
    sHTML = sHTML + "<input title='Choose any one type' type='radio' id='optRent' name='"+encode64('optType')+ "' value='"+encode64('Rent')+ "' onclick='AppendAdditionalAmount()'/>Rent";
    sHTML = sHTML + "</td>";
    sHTML = sHTML + "<td class='search_ctrl_lbl'>";
    sHTML = sHTML + "<input title='Choose any one type' type='radio' id='optLease' name='"+encode64('optType')+ "' value='"+encode64('Lease')+ "' onclick='RemovAdditionalAmount()'/>Lease";
    sHTML = sHTML + "</td>";
    sHTML = sHTML + "<td class='search_ctrl_lbl' style='padding-top: 1px;'>";
    sHTML = sHTML + "&nbsp;&nbsp;&nbsp;Price Range:&nbsp;Rs :";
    sHTML = sHTML + "</td>";
    sHTML = sHTML + "<td class='search_ctrl_lbl'>";
    sHTML = sHTML + "&nbsp;<select name='"+encode64('cmbFromAmt')+"' class='input_combobox_small' style='width: 111px'  id='cmbPriceRangeMinimum'>";
    sHTML = sHTML + "<option>-- Select --</option>";
    sHTML=sHTML+"<option value='25000'>25000</option>";
    sHTML = sHTML + "<option value='50000'>50000</option>";
    sHTML=sHTML+"<option value='75000'>75000</option>";
    sHTML = sHTML + "<option value='100000'>100000</option>";
    sHTML = sHTML + "<option value='300000'>300000</option>";
    sHTML = sHTML + "<option value='500000'>500000</option>";
    sHTML = sHTML + "<option value='700000'>700000</option>";
    sHTML = sHTML + "<option value='1000000'>1000000</option>";
    sHTML = sHTML + "<option value='2000000'>2000000</option>";
    sHTML = sHTML + "<option value='3000000'>3000000</option>";
    sHTML = sHTML + "<option value='4000000'>4000000</option>";
    sHTML = sHTML + "<option value='5000000'>5000000</option>";
    sHTML = sHTML + "<option value='6000000'>6000000</option>";
    sHTML = sHTML + "<option value='7000000'>7000000</option>";
    sHTML = sHTML + "<option value='8000000'>8000000</option>";
    sHTML = sHTML + "<option value='9000000'>9000000</option>";
    sHTML = sHTML + "<optionvalue='10000000'>10000000</option>";
    sHTML = sHTML + "</select>";
    sHTML = sHTML + "&nbsp;to&nbsp;Rs :";
    sHTML = sHTML + "&nbsp;<select name='"+encode64('cmbToAmt')+"' class='input_combobox_small' style='width: 111px'  id='cmbPriceRangeMaximum'>";
    sHTML = sHTML + "<option>-- Select --</option>";
    sHTML = sHTML + "<option value='25000'>25000</option>";
    sHTML = sHTML + "<option value='50000'>50000</option>";
    sHTML = sHTML + "<option value='75000'>75000</option>";
    sHTML = sHTML + "<option value='100000'>100000</option>";
    sHTML = sHTML + "<option value='200000'>200000</option>";
    sHTML = sHTML + "<option value='400000'>400000</option>";
    sHTML = sHTML + "<option value='600000'>600000</option>";
    sHTML = sHTML + "<option value='800000'>800000</option>";
    sHTML = sHTML + "<option value='1000000'>1000000</option>";
    sHTML = sHTML + "<option value='2500000'>2500000</option>";
    sHTML = sHTML + "<option value='3500000'>3500000</option>";
    sHTML = sHTML + "<option value='4500000'>4500000</option>";
    sHTML = sHTML + "<option value='5500000'>5500000</option>";
    sHTML = sHTML + "<option value='6500000'>6500000</option>";
    sHTML = sHTML + "<option value='7500000'>7500000</option>";
    sHTML = sHTML + "<option value='8500000'>8500000</option>";
    sHTML = sHTML + "<option value='9500000'>9500000</option>";
    sHTML = sHTML + "<option value='10000000'> > 10000000</option>";
    sHTML = sHTML + "</select>";
    sHTML = sHTML + "</td>";
    sHTML = sHTML + "</tr>";
    sHTML = sHTML + "</table>";
    sHTML = sHTML + "</td>";
    sHTML = sHTML + "</tr>";
    sHTML = sHTML + "<tr>";
    sHTML = sHTML + "<td style='padding-left: 1px'>";
    sHTML = sHTML + "<table border='0' cellpadding='0' cellspacing='0'>";
    sHTML = sHTML + "<tr>";
    sHTML = sHTML + "<td class='search_ctrl_lbl'>";
    sHTML = sHTML + "Location, City, State :";
    sHTML = sHTML + "</td>";
    sHTML = sHTML + "<td>";
    sHTML = sHTML + "<input type='text' value='[ e.g. Burma Colony, Subramaniapuram, Karaikudi, Tamil Nadu ]' name='"+encode64('txtLocation')+"' style='width: 250px;height:20px' class='input_textbox' id='txtLocation' onfocus='ClearSearchText(txtLocation)' />";
    sHTML = sHTML + "</td>";
    sHTML = sHTML + "<td class='search_ctrl_lbl'>";
    sHTML = sHTML + "&nbsp;Property Type:";
    sHTML = sHTML + "</td>";
    sHTML = sHTML + "<td align='left'>";
    sHTML = sHTML + "<select id='cmbPropertyType' class='input_combobox'  style='width: 174px' name='"+encode64('cmbPropertyType')+"'>";
    sHTML = sHTML + "<option value='0'>--Select--</option>";
    sHTML = sHTML + "<option value='Warehouse/Godown'>Warehouse/Godown</option>";
    sHTML = sHTML + "<option value='Apartments-flats'>Apartments-flats</option>";
    sHTML = sHTML + "<option value='Individual-houses'>Individual-houses</option>";
    sHTML = sHTML + "<option value='Villas'>Villas</option>";
    sHTML = sHTML + "<option value='Plots/Land'>Plots/Land</option>";
    sHTML = sHTML + "<option value='OfficeSpace'>Office Space</option>";
    sHTML = sHTML + "<option value='Showrooms/Shops'>Showrooms/Shops</option>";
    sHTML = sHTML + "<option value='Restaurant/Bar'>Restaurant/Bar</option>";
    sHTML = sHTML + "<option value='Others'>Others</option>";
    sHTML = sHTML + "<option value='Industrial Space'>Industrial Space</option>";
    sHTML = sHTML + "<option value='Agricultural Land/Farm Land'>Land/Farm Land</option>";
    sHTML = sHTML + "</select>";
    sHTML = sHTML + "</td>";
    sHTML = sHTML + "</tr>";
    sHTML = sHTML + "</table>";
    sHTML = sHTML + "</td>";
    sHTML = sHTML + "</tr>";
    sHTML = sHTML + "</table>";
    sHTML = sHTML + "</td>";
    sHTML = sHTML + "<td>";
    sHTML = sHTML + "<input type='image' src='images/btn_go.jpg' alt='Click to Search' id='btnSearch' style='height:40px;width:30px' onclick='RequirementSearch()'/>&nbsp;";
    sHTML = sHTML + "</td>";
    sHTML = sHTML + "</table>";
    sHTML = sHTML + "</td>";
    sHTML = sHTML + "<td class='search_bg_02'>";
    sHTML = sHTML + "</td>";
    sHTML = sHTML + "</tr>";
    sHTML = sHTML + "</table>";
    document.getElementById('searchHeader').innerHTML = sHTML;
}

function ClearSearchText(cControl) 
{
    var cID=cControl.id;
    document.getElementById(cID).style.color='Black';
    document.getElementById(cID).value = "";
}

function Menubar() {
    var sHTML = "";
    IsUserLogged("");
     sHTML = sHTML + "<div class='chromestyle' id='chromemenu'>";
        sHTML = sHTML + "<ul>";
        sHTML = sHTML + "<li><b><a href='index.html' title='Property Portal'>HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='aboutus.html' title='Real Estate karaikudi'>ABOUT US</a></b></li>";
        sHTML = sHTML + "<li><b><a href='#' onclick='IsUserLogged(\"Sell\")' title='Property Sales'>SELL</a></b></li>";
        sHTML = sHTML + "<li><b><a href='#' onclick='IsUserLogged(\"Buy\")' title='Buy property'>BUY</a></b></li>";
        sHTML = sHTML + "<li><b><a href='#' rel='dropmenu1' title=''Rent Property>RENT</a></b></li>";
        sHTML = sHTML + "<li><b><a href='#' rel='dropmenu3' title='lease property, Real Estate'>LEASE</a></b></li>";
        sHTML = sHTML + "<li><b><a href='#' onclick='IsUserLogged(\"PROPERTYLIST\")' title='Karaikudi Property List'>PROPERTY LIST</a></b></li>";
        sHTML = sHTML + "<li><b><a href='#' onclick='IsUserLogged(\"DOWNLOAD\")' title='Download Property List'>DOWNLOAD</a></b></li>";
        sHTML = sHTML + "<li><b><a href='karaikudi-directory.html' title='Emergency Call List'>DIRECTORY</a></b></li>";
        sHTML = sHTML + "<li><b><a href='contactus.php' title='contact property Information'>CONTACT US</a></b></li>";
        sHTML = sHTML + "<li id='login' name='login'></li>";
        sHTML = sHTML + "<li id='CP' name='CP'><a href='#' onclick='IsAdminUserLogged(\"CP\")' style='cursor: pointer;'><img src='/images/goback.png' title='Click to go to Control panel Page' width='15px' height='15px' style='border: 0px' /></a></li>";
        sHTML = sHTML + "</ul>";
        sHTML = sHTML + "</div>";
        sHTML = sHTML + "<div id='dropmenu1' class='dropmenudiv'>";
        sHTML = sHTML + "<a href='#' onclick='IsUserLogged(\"RentIn\")' title='Rent in property'>RENT - IN</a>";
        sHTML = sHTML + "<a href='#' onclick='IsUserLogged(\"RentOut\")' title='Rent out property'>RENT - OUT</a>";
        sHTML = sHTML + "</div>";
        sHTML = sHTML + "<div id='dropmenu3' class='dropmenudiv'>";
        sHTML = sHTML + "<a href='#' onclick='IsUserLogged(\"LeaseIn\")' title='Lease in property'>LEASE - IN</a>";
        sHTML = sHTML + "<a href='#' onclick='IsUserLogged(\"LeaseOut\")' title='lease out property'>LEASE - OUT</a>";
        sHTML = sHTML + "</div>";
    document.write(sHTML);
    cssdropdown.startchrome("chromemenu");
}


function PropertyListingMenubar() {
    var sHTML = "";
   IsUserLogged("");
   sHTML = sHTML + "<div class='chromestyle' id='chromemenu'>";
        sHTML = sHTML + "<ul>";
        sHTML = sHTML + "<li><b><a href='index.html'>HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='aboutus.html'>ABOUT US</a></b></li>";
        sHTML = sHTML + "<li><b><a href='#' onclick='IsUserLogged(\"Sell\")'>SELL</a></b></li>";
        sHTML = sHTML + "<li><b><a href='#' onclick='IsUserLogged(\"Buy\")'>BUY</a></b></li>";
        sHTML = sHTML + "<li><b><a href='#' rel='dropmenu1'>RENT</a></b></li>";
        sHTML = sHTML + "<li><b><a href='#' rel='dropmenu3'>LEASE</a></b></li>";
        sHTML = sHTML + "<li><b><a href='#' onclick='IsUserLogged(\"PROPERTYLIST\")'>PROPERTY LIST</a></b></li>";
        sHTML = sHTML + "<li><b><a href='#' onclick='IsUserLogged(\"DOWNLOAD\")'>DOWNLOAD</a></b></li>";
        sHTML = sHTML + "<li><b><a href='karaikudi-directory.html'>DIRECTORY</a></b></li>";
        sHTML = sHTML + "<li><b><a href='contactus.php'>CONTACT US</a></b></li>";
        sHTML = sHTML + "<li id='login' name='login'><b><a href='#' onclick='CheckLoggedOut()'>LOGOUT</a></b></li>";
        sHTML = sHTML + "<li id='CP' name='CP'><a href='#' onclick='IsAdminUserLogged(\"CP\")' style='cursor: pointer;'><img src='/images/goback.png' title='Click to go to Control panel Page' width='15px' height='15px' style='border: 0px' /></a></li>";
        sHTML = sHTML + "</ul>";
        sHTML = sHTML + "</div>";
        sHTML = sHTML + "<div id='dropmenu1' class='dropmenudiv'>";
        sHTML = sHTML + "<a href='#' onclick='IsUserLogged(\"RentIn\")'>RENT - IN</a>";
        sHTML = sHTML + "<a href='#' onclick='IsUserLogged(\"RentOut\")'>RENT - OUT</a>";
        sHTML = sHTML + "</div>";
        sHTML = sHTML + "<div id='dropmenu3' class='dropmenudiv'>";
        sHTML = sHTML + "<a href='#' onclick='IsUserLogged(\"LeaseIn\")'>LEASE - IN</a>";
        sHTML = sHTML + "<a href='#' onclick='IsUserLogged(\"LeaseOut\")'>LEASE - OUT</a>";
        sHTML = sHTML + "</div>";
        document.write(sHTML);
    cssdropdown.startchrome("chromemenu");
}

function PropertyMenu()
{

}
function admin_Menubar(PgName) {
    var sHTML = "";
    IsAdminUserLogged("");
     sHTML = sHTML + "<div class='chromestyle' id='chromemenu'>";
        sHTML = sHTML + "<ul>";
        sHTML = sHTML + "<li><b><a href='/index.html' title='Property Portal'>HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='/aboutus.html' title='Real Estate karaikudi'>ABOUT US</a></b></li>";
        sHTML = sHTML + "<li><b><a href='#' onclick='IsAdminUserLogged(\"Sell\")' title='Property Sales'>SELL</a></b></li>";
        sHTML = sHTML + "<li><b><a href='#' onclick='IsAdminUserLogged(\"Buy\")' title='Buy property'>BUY</a></b></li>";
        sHTML = sHTML + "<li><b><a href='#' rel='dropmenu1' title=''Rent Property>RENT</a></b></li>";
        sHTML = sHTML + "<li><b><a href='#' rel='dropmenu3' title='lease property, Real Estate'>LEASE</a></b></li>";
        sHTML = sHTML + "<li><b><a href='#' onclick='IsAdminUserLogged(\"PROPERTYLIST\")' title='Karaikudi Property List'>PROPERTY LIST</a></b></li>";
        sHTML = sHTML + "<li><b><a href='#' onclick='IsAdminUserLogged(\"DOWNLOAD\")' title='Download Property List'>DOWNLOAD</a></b></li>";
        sHTML = sHTML + "<li><b><a href='/karaikudi-directory.html' title='Emergency Call List'>DIRECTORY</a></b></li>";
        sHTML = sHTML + "<li><b><a href='/contactus.php' title='contact property Information'>CONTACT US</a></b></li>";
        sHTML = sHTML + "<li id='login' name='login'></li>";
        if(PgName=='ACP')
         sHTML = sHTML + "<li id='CP' name='CP'><a href='controlpanel.html' style='cursor: pointer;'><img src='/images/goback.png' title='Click to go to Control panel Page' width='15px' height='15px' style='border: 0px' /></a></li>";
         else
         sHTML = sHTML + "<li id='CP' name='CP'><a href='#' onclick='IsAdminUserLogged(\"ACP\")' style='cursor: pointer;'><img src='/images/goback.png' title='Click to go to Control panel Page' width='15px' height='15px' style='border: 0px' /></a></li>";
        sHTML = sHTML + "</ul>";
        sHTML = sHTML + "</div>";
        sHTML = sHTML + "<div id='dropmenu1' class='dropmenudiv'>";
        sHTML = sHTML + "<a href='#' onclick='IsAdminUserLogged(\"RentIn\")' title='Rent in property'>RENT - IN</a>";
        sHTML = sHTML + "<a href='#' onclick='IsAdminUserLogged(\"RentOut\")' title='Rent out property'>RENT - OUT</a>";
        sHTML = sHTML + "</div>";
        sHTML = sHTML + "<div id='dropmenu3' class='dropmenudiv'>";
        sHTML = sHTML + "<a href='#' onclick='IsAdminUserLogged(\"LeaseIn\")' title='Lease in property'>LEASE - IN</a>";
        sHTML = sHTML + "<a href='#' onclick='IsAdminUserLogged(\"LeaseOut\")' title='lease out property'>LEASE - OUT</a>";
        sHTML = sHTML + "</div>";
    document.write(sHTML);
    cssdropdown.startchrome("chromemenu");
}




String.prototype.contains = function(it) { return this.indexOf(it) != -1; };

function ValidateEmailID(Emaild) {
    var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
    var address = Emaild
    if (reg.test(address) == false) {
        return false;
    }

    return true;
}

function footer() {
    var sHtml = '';
    sHtml = sHtml + '<div style="text-align:center;" class="footer" style="width:650px">';
    sHtml = sHtml + '<a href="privacy-policy.html" title="PropertyPrivacy">Privacy</a>&nbsp;|&nbsp; <a href="terms-of-use.html" title="Terms of Property ">Terms of Use</a>&nbsp;|&nbsp;';
    sHtml = sHtml + '<a href="kkdi-properties-career.html" title="Property Information">Careers</a>&nbsp;|&nbsp;<a href="calculators.html" title="Buy, Sell, Rent, Property Calculator">Calculators</a>&nbsp;|&nbsp; <a href="http://www.karaikudiproperties.com/adviceandopinions" target="blank" title="Property Legal, vasthu, opinion">';
        sHtml = sHtml + 'Advice & Opinions</a>&nbsp;|&nbsp; <a href="housingloan-documents.html" title="Housing Loan document Requirements">Housing Loan</a> | &nbsp; <a href="weblinks.html" title="Registration guidelines">Web links</a>&nbsp;';
        sHtml = sHtml + '| <a href="karaikudi-properties-rssfeed.html"><img src="/images/feed.png" style="border:1px;vertical-align:middle"></a>';
            sHtml = sHtml + '<div style="text-align:center">Copyright &copy; 2010, Karaikudi Properties a Trademark of <a href="http://www.wbcsoftwarelab.com/" target="_blank" title="Offshore IT">WBC Software Lab</a>.</div>';
            sHtml = sHtml + '<div style="text-align:center">Design / Development by <a href="http://www.wbcsoftwarelab.com/" target="_blank" title="Wbc Software lab">WBC Software Lab </a></div>';
    sHtml = sHtml + '</div>';
    document.write(sHtml);
}


function admin_footer() {
    var sHtml = '';
    sHtml = sHtml + '<div style="text-align:center;" class="footer" style="width:650px">';
    sHtml = sHtml + '<a href="/privacy-policy.html" title="PropertyPrivacy">Privacy</a>&nbsp;|&nbsp; <a href="/terms-of-use.html" title="Terms of Property ">Terms of Use</a>&nbsp;|&nbsp;';
    sHtml = sHtml + '<a href="/kkdi-properties-career.html" title="Property Information">Careers</a>&nbsp;|&nbsp;<a href="/calculators.html" title="Buy, Sell, Rent, Property Calculator">Calculators</a>&nbsp;|&nbsp; <a href="http://www.karaikudiproperties.com/adviceandopinions" target="blank" title="Property Legal, vasthu, opinion">';
        sHtml = sHtml + 'Advice & Opinions</a>&nbsp;|&nbsp; <a href="/housingloan-documents.html" title="Housing Loan document Requirements">Housing Loan</a> | &nbsp; <a href="/weblinks.html" title="Registration guidelines">Web links</a>&nbsp;';
        sHtml = sHtml + '| <a href="/karaikudi-properties-rssfeed.html"><img src="/images/feed.png" style="border:1px;vertical-align:middle"></a>';
            sHtml = sHtml + '<div style="text-align:center">Copyright &copy; 2010, Karaikudi Properties a Trademark of <a href="http://www.wbcsoftwarelab.com/" target="_blank" title="Offshore IT">WBC Software Lab</a>.</div>';
            sHtml = sHtml + '<div style="text-align:center">Design / Development by <a href="http://www.wbcsoftwarelab.com/" target="_blank" title="Wbc Software lab">WBC Software Lab </a></div>';
    sHtml = sHtml + '</div>';
    document.write(sHtml);
}

String.prototype.endsWith = function(str)
{
    var lastIndex = this.lastIndexOf(str);
    return (lastIndex != -1) && (lastIndex + str.length == this.length);
}

function ads() {
    var sHtml = '';

    sHtml = sHtml + '<table cellpadding="0" cellspacing="0">';
    sHtml = sHtml + '<tr>';
        sHtml = sHtml + '<td>';
            sHtml = sHtml + '<a href="#" style="text-decoration: none">';
                sHtml = sHtml + '<img src="images/SignupToday_2.gif" alt="Click to Signup" onclick="startPopUp()" border="0" />';
            sHtml = sHtml + '</a>';
        sHtml = sHtml + '</td>';
        sHtml = sHtml + '<td>';
            sHtml = sHtml + '<a  href="contactus.php">';
                sHtml = sHtml + '<img src="images/Ads01.gif" alt="For property sale, buy, rent or lease or promote your services advertise here, contact us through our website" border="0" />';
            sHtml = sHtml + '</a>';
        sHtml = sHtml + '</td>';
         sHtml = sHtml + '<td>';
                 sHtml = sHtml + '<a  href="contactus.php">';
         sHtml = sHtml + '<img src="images/Ads02.gif" alt="For property sale, buy, rent or lease or promote your services advertise here, contact us through our website" border="0" />';
                sHtml = sHtml + '</a>';
        sHtml = sHtml + '</td>';
    sHtml = sHtml + '</tr>';
    sHtml = sHtml + '<tr>';
        sHtml = sHtml + '<td>';
            sHtml = sHtml + '<div class="pWinConfg" id="pWinConfg">';
                    sHtml = sHtml + '<table cellpadding="0" cellspacing="0" border="0">';
                    sHtml = sHtml + '<tr>';
                           sHtml = sHtml + '<td>';
                                sHtml = sHtml + '<table cellpadding="0" cellspacing="0" border="0" width="100%" style="height: 120px">';
                                sHtml = sHtml + '<tr>';
                                    sHtml = sHtml + '<td>';
                                        sHtml = sHtml + '<table border="0" cellspacing="0" cellpadding="0">';
                                            sHtml = sHtml + '<tr>';
                                                sHtml = sHtml + '<td colspan="2">';
                                                        sHtml = sHtml + '<strong class="popFont">Signup today & receive our property updates & promotions in and around karaikudi</strong>';
                                                sHtml = sHtml + '</td>';
                                            sHtml = sHtml + '</tr>';
                                            sHtml = sHtml + '<tr>';
                                                sHtml = sHtml + '<td colspan="2">';
                                                       sHtml = sHtml + '&nbsp;';
                                                sHtml = sHtml + '</td>';
                                            sHtml = sHtml + '</tr>';
                                            sHtml = sHtml + '<tr>';
                                                 sHtml = sHtml + '<td>';
                                                        sHtml = sHtml + '<table cellpadding="0" cellspacing="0">';
                                                            sHtml = sHtml + '<tr>';
                                                                sHtml = sHtml + '<td class="popFont">';
                                                                       sHtml = sHtml + 'Email Id';
                                                                sHtml = sHtml + '</td>';
                                                                sHtml = sHtml + '<td>';
                                                                    sHtml = sHtml + '<input id="txtEmailIdAds" type="text" name="txtEmailIdAds" style="width: 270px" title="Enter your valid email id" />';
                                                                sHtml = sHtml + '</td>';
                                                             sHtml = sHtml + '</tr>';
                                                             sHtml = sHtml + '<tr>';
                                                                sHtml = sHtml + '<td colspan="2">';
                                                                    sHtml = sHtml + '&nbsp;';
                                                                sHtml = sHtml + '</td>';
                                                            sHtml = sHtml + '</tr>';
                                                            sHtml = sHtml + '<tr>';
                                                                sHtml = sHtml + '<td class="popFont" style="width: 65px">';
                                                                    sHtml = sHtml + 'Contact No';
                                                                sHtml = sHtml + '</td>';
                                                                sHtml = sHtml + '<td>';
                                                                    sHtml = sHtml + '<input id="txtPhno" type="text" name="txtPhno" style="width: 270px" title="Enter your mobile or land line no" />';
                                                                    sHtml = sHtml + '</td>';
                                                             sHtml = sHtml + '</tr>';
                                                             sHtml = sHtml + '<tr>';
                                                                 sHtml = sHtml + '<td colspan="2">';
                                                                    sHtml = sHtml + '&nbsp;';
                                                                 sHtml = sHtml + '</td>';
                                                             sHtml = sHtml + '</tr>';
                                                            sHtml = sHtml + '<tr>';
                                                                sHtml = sHtml + '<td>';
                                                                    sHtml = sHtml + '<a href="#">';
                                                                            sHtml = sHtml + '<img src="images/close.gif" alt="Click to close" onclick="hidePopUp()" border="0" /></a>';
                                                                sHtml = sHtml + '</td>';
                                                                sHtml = sHtml + '<td align="right" style="padding-right: 1px">';
                                                                    sHtml = sHtml + '<input id="btnSubmit" type="button" value="Submit" title="Click to Sign up" onclick="SaveVistors();" />';
                                                                sHtml = sHtml + ' </td>';
                                                            sHtml = sHtml + '</tr>';
                                                           sHtml = sHtml + '</table>';
                                                        sHtml = sHtml + '</td>';
                                                    sHtml = sHtml + '</tr>';
                                                sHtml = sHtml + '</table>';
                                            sHtml = sHtml + '</td>';
                                        sHtml = sHtml + '</tr>';
                                    sHtml = sHtml + '</table>';
                                sHtml = sHtml + '</td>';
                            sHtml = sHtml + '</tr>';
                        sHtml = sHtml + '</table>';
                     sHtml = sHtml + '</div>';
                   sHtml = sHtml + '</td>';
                sHtml = sHtml + '</tr>';
            sHtml = sHtml + '</table>';


    document.write(sHtml);
}

function projecttypes()
{
    var sHtml = '';
    sHtml ='<select id="cmbPropValue" name="cmbPropValue" class="input_combobox" title="Select one of the property value">';
        sHtml=sHtml+'<option value="0">--Select--</option>';
        sHtml=sHtml+'<option value="Warehouse/Godown">Warehouse/Godown</option>';
        sHtml=sHtml+'<option value="Apartments-flats">Apartments-flats</option>';
        sHtml=sHtml+'<option value="Individual-houses">Individual-houses</option>';
        sHtml=sHtml+'<option value="Villas">Villas</option>';
        sHtml=sHtml+'<option value="Plots/Land">Plots/Land</option>';
        sHtml=sHtml+'<option value="OfficeSpace">Office Space</option>';
        sHtml=sHtml+'<option value="Showrooms/Shops">Showrooms/Shops</option>';
        sHtml=sHtml+'<option value="Restaurant/Bar">Restaurant/Bar</option>';
        sHtml=sHtml+'<option value="Others">Others</option>';
        sHtml=sHtml+'<option value="Industrial Space">Industrial Space</option>';
        sHtml=sHtml+'<option value="Agricultural Land/Farm Land">Land/Farm Land</option>';
    sHtml =sHtml+'</select>';
    document.write(sHtml);
}

var digitsOnly = /[1234567890]/g;
var integerOnly = /[0-9\.]/g;
var alphaOnly = /[A-Z]/g;

function restrictCharacters(myfield, e, restrictionType) 
{
	if (!e) var e = window.event
	if (e.keyCode) code = e.keyCode;
	else if (e.which) code = e.which;
	var character = String.fromCharCode(code);
	
	if (code==27) { this.blur(); return false; }

	if (!e.ctrlKey && code!=9 && code!=8 && code!=36 && code!=37 && code!=38 && (code!=39 || (code==39 && character=="'")) && code!=40) {
		if (character.match(restrictionType)) 
		{
			return true;
		} 
		else 
		{
			return false;
		}
		
	}
}

function Validate(strEmail) 
{
   var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   var address = strEmail;
   if(reg.test(address) == false) 
   return false;
   else
   return true;
}

function Validate_Mobile(nMobile)
{
   var reg = /[\+][\d]{1}[\d]{10}/;
   if(!reg.test(nMobile)) 
   return false;
   else
   return true;
}

function note()
{
    var sHtml = '';
    sHtml=sHtml+"<table cellpadding='0' cellspacing='0' border='0'>";
        sHtml=sHtml+"<tr>";
            sHtml=sHtml+"<td class='content'>";
                sHtml=sHtml+"&nbsp;<span class='note_title'>Note</span>: Your email address, contact information won't be shared during search listing, All enquiries will be handled by Karaikudi properties and informed to you when there is an enquiry.";
            sHtml=sHtml+"</td>";
        sHtml=sHtml+"</tr>";
    sHtml=sHtml+"</table>";
    document.write(sHtml);
}

function small_note()
{
    var sHtml = '';
    sHtml=sHtml+"<table cellpadding='0' cellspacing='0' border='0' width='520px' height='10px'>";
        sHtml=sHtml+"<tr>";
            sHtml=sHtml+"<td class='content'>";
                sHtml=sHtml+"&nbsp;<span class='note_title'>Note</span>: Your email address, contact information won't be shared during search listing, All enquiries will be handled by Karaikudi properties and informed to you when there is an enquiry.";
            sHtml=sHtml+"</td>";
        sHtml=sHtml+"</tr>";
    sHtml=sHtml+"</table>";
    document.write(sHtml);
}

var PageName = "";
function IsUserLogged(strPageName) {
    nocache = Math.random();
    PageName = strPageName;
    http.open('get', 'controller/logininfo.php?Login=IsUserLogged&nocache = ' + nocache);
    http.onreadystatechange =function() { GetLoggedReply(strPageName)}  ;
    http.send(null);
}
var Login = "";
function GetLoggedReply(PageName) {
    
    if (http.readyState == 4) {
        var UserId = 0;
        var AccessRights="";
        var response = http.responseText;
        ResponseValue = response.split(',');
        UserId=ResponseValue[0];
        AccessRights=ResponseValue[1];
        if (UserId == 0) {
            Login = "LOGIN";
            if (PageName == "Sell") {
            
                window.location = "login.html?"+encode64("0");
            }
            else if (PageName == "Buy") {
                window.location = "login.html?"+encode64("1");
            }
            else if (PageName == "RentIn") {
                window.location = "login.html?"+encode64("2");
            }
            else if (PageName == "RentOut") {
                window.location = "login.html?"+encode64("3");
            }
            else if (PageName == "LeaseIn") {
                window.location = "login.html?"+encode64("4");
            }
            else if (PageName == "LeaseOut") {
                window.location = "login.html?"+encode64("5");
            }
            else if (PageName == "DOWNLOAD") {
                window.location = "login.html?"+encode64("9");
            }
            else if (PageName == "PROPERTYLIST") {
                window.location = "login.html?"+encode64("10");
            }
           
            
            document.getElementById('login').innerHTML = "<b><a href='login.html'>LOGIN</a></b>";
        }
        else {
            if(AccessRights == "Admin")
            {
                document.getElementById('CP').innerHTML="<a href='#' onclick='IsAdminUserLogged(\"CP\")' style='cursor: pointer;'><img src='/images/goback.png' title='Click to go to Control panel Page' width='15px' height='15px' style='border: 0px' /></a>";
            }
            else {
                document.getElementById('CP').innerHTML="";
            }
             document.getElementById('login').innerHTML = "<b><a href='#' onclick='CheckLoggedOut()'>LOGOUT</a></b>";
            Login = "LOGOUT"
            if (PageName == "Sell") {
                window.location = "sell.html";
            }
            else if (PageName == "Buy") {
                window.location = "buy.html";
            }
            else if (PageName == "RentIn") {
                window.location = "rent-in.html";
            }
            else if (PageName == "RentOut") {
                window.location = "rent-out.html";
            }
            else if (PageName == "LeaseIn") {
                window.location = "lease-in.html";
            }
            else if (PageName == "LeaseOut") {
                window.location = "lease-out.html";
            }
            else if (PageName == "DOWNLOAD") {
                window.location = "downloads.html";
            }
            else if (PageName == "PROPERTYLIST") {
            window.location = "propertylisting.html?0&0&0&0&0";
            }
           
        }

    }

}




function IsAdminUserLogged(strPageName) {
    nocache = Math.random();
    PageName = strPageName;
     http.open('get', '/controller/logininfo.php?Login=IsUserLogged&nocache = ' + nocache);
    http.onreadystatechange =function(){ GetAdminLoggedReply(PageName)};
    http.send(null);
}

var Login = "";
function GetAdminLoggedReply(PageName) {
    if (http.readyState == 4) {
        var UserId = 0;
        var AccessRights="";
        var response = http.responseText;
        ResponseValue = response.split(',');
        UserId=ResponseValue[0];
        AccessRights=ResponseValue[1];
        if (UserId == 0) {
            Login = "LOGIN";
            if (PageName == "Sell") {
            
                window.location = "/login.html?"+encode64("0");
            }
            else if (PageName == "Buy") {
                window.location = "/login.html?"+encode64("1");
            }
            else if (PageName == "RentIn") {
                window.location = "/login.html?"+encode64("2");
            }
            else if (PageName == "RentOut") {
                window.location = "/login.html?"+encode64("3");
            }
            else if (PageName == "LeaseIn") {
                window.location = "/login.html?"+encode64("4");
            }
            else if (PageName == "LeaseOut") {
                window.location = "/login.html?"+encode64("5");
            }
            else if (PageName == "DOWNLOAD") {
                window.location = "/login.html?"+encode64("9");
            }
            else if (PageName == "PROPERTYLIST") {
                window.location = "/login.html?"+encode64("10");
            }
            else if(PageName == "controlpanel") {
            
                window.location = "/login.html";
            }
            else if (PageName == "signuplist") {
                window.location = "/login.html";
                //OnLoadVisitorsLists();
            }
            else if (PageName == "propertyrequirements") {
                window.location = "/login.html";
            }
            else if (PageName == "registereduserlist") {
                window.location = "/login.html";
            }
            else if (PageName == "CP") {
               document.getElementById('CP').innerHTML="";
            }
            document.getElementById('login').innerHTML = "<b><a href='/login.html'>LOGIN</a></b>";
        }
        
        else {
        document.getElementById('login').innerHTML = "<b><a href='#' onclick='CheckAdminLoggedOut()'>LOGOUT</a></b>";
        if(AccessRights == "Admin")
        {
            document.getElementById('CP').innerHTML="<a href='#' onclick='IsAdminUserLogged(\"ACP\")' style='cursor: pointer;'><img src='/images/goback.png' title='Click to go to Control panel Page' width='15px' height='15px' style='border: 0px' /></a>";
        }
        else {
            document.getElementById('CP').innerHTML="";
            }
            Login = "LOGOUT"
            if (PageName == "Sell") {
                window.location = "/sell.html";
            }
            else if (PageName == "Buy") {
                window.location = "/buy.html";
            }
            else if (PageName == "RentIn") {
                window.location = "/rent-in.html";
            }
            else if (PageName == "RentOut") {
                window.location = "/rent-out.html";
            }
            else if (PageName == "LeaseIn") {
                window.location = "/lease-in.html";
            }
            else if (PageName == "LeaseOut") {
                window.location = "/lease-out.html";
            }
            else if (PageName == "DOWNLOAD") {
                window.location = "/downloads.html";
            }
            else if (PageName == "PROPERTYLIST") {
            window.location = "/propertylisting.html?0&0&0&0&0";
            }
            else if(PageName == "controlpanel") {
                window.location="/index.html";
            }
            else if (PageName == "signuplist") {
                OnLoadVisitorsLists();
            }
            else if (PageName == "propertyrequirements") {
                OnLoadAdminPropertyList(0);
                LoadImage();
            }
            else if (PageName == "registereduserlist") {
                OnLoadUsersLists(1);
            }
            else if (PageName == "CP" && AccessRights == "Admin") {
               window.location = "admin/controlpanel.html";
            }
             else if (PageName == "ACP" && AccessRights == "Admin") {
               window.location = "controlpanel.html";
            }
        
        }

    }

}



function CheckLoggedOut() {
    http.open('get', 'controller/logininfo.php?Login=LogOut&nocache = ' + nocache);
    http.onreadystatechange = GetLoggedOutReply;
    http.send(null);
}

function GetLoggedOutReply() {
    if (http.readyState == 4) {
        var response = http.responseText;
        if (response == "1") {
            window.location = "login.html"; 
            if( document.getElementById("CP")!=null)
            document.getElementById("CP").InnerHTML=""; 
        }
    }
}


function CheckAdminLoggedOut() {
    http.open('get', '/controller/logininfo.php?Login=LogOut&nocache = ' + nocache);
    http.onreadystatechange = GetAdminLoggedOutReply;
    http.send(null);
}

function GetAdminLoggedOutReply() {
    if (http.readyState == 4) {
        var response = http.responseText;
        if (response == "1") {
            window.location = "/login.html"; 
             document.getElementById('CP').innerHTML=""; 
        }
    }
}

function CheckUserLogin()
{
 nocache = Math.random();
     http.open('get', 'controller/logininfo.php?Login=IsUserLogged&nocache = ' + nocache);
    http.onreadystatechange = CheckUserLoginReply;
    http.send(null);
}

function CheckUserLoginReply() {
    if (http.readyState == 4) {
        var UserId = 0;
        var response = http.responseText;
        UserId = response;
        if (UserId == 0) {
                window.location = "login.html?"+encode64("9");
        }
        }

    }

Array.prototype.clean = function(deleteValue) 
{
  for (var i = 0; i < this.length; i++) 
  {
    if (this[i] == deleteValue) 
    {         
      this.splice(i, 1);
      i--;
    }
  }
  return this;
};

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

String.prototype.startsWith = function(str)
{return (this.match("^"+str)==str)}

function Enable_CalculatorControls()
{
    for(i=0;i<document.forms[0].elements.length;i++)
    {
        if(document.forms[0].elements[i].type=="text")
        document.forms[0].elements[i].readOnly = true;
    }
}

function Disable_CalculatorControls()
{
    for(i=0;i<document.forms[0].elements.length;i++)
    {
        if(document.forms[0].elements[i].type=="text")
        document.forms[0].elements[i].readOnly = false;
    }
}


function GetURL(strURL) {
    //nID = strURL.substring(strURL.indexOf('?')+4, strURL.length);
    arrSplittURL = strURL.split('&');
    nID = arrSplittURL[0].substring(arrSplittURL[0].indexOf('?') + 4, arrSplittURL[0].length);
    PostRequirementID = nID;
    if (arrSplittURL.length > 1) {
        sIsapproval = arrSplittURL[1].substring(arrSplittURL[1].indexOf('=') + 1, arrSplittURL[1].length);
        page = arrSplittURL[2].substring(arrSplittURL[2].indexOf('=') + 1, arrSplittURL[2].length);
    }
    else
        sIsapproval = "";
}

var strEncodedURL="";
function GetEncodedQuerystring(strURL) {
    
    if(strURL.contains('?'))
    {
        arrSplittURL = strURL.split('&');
        strEncodedURL = arrSplittURL[0].substring(arrSplittURL[0].indexOf('?') + 4, arrSplittURL[0].length);
    }
    else
    strEncodedURL = "";
}

//function PostRequirementApproval() {
//    nocache = Math.random();
//    http.open('get', "controller/properties.php?Type=ApproveRequirement&EncodedURL=" + strEncodedURL + "&nocache = " + nocache);
//    http.onreadystatechange = GetPostRequirementData;
//    http.send(null);
//}




function RedirectLogin()
{
    GetEncodedQuerystring(parent.document.URL);
    if (strEncodedURL != "") {
        PostRequirementApproval();
    }
    else
    {
         nocache = Math.random();
         http.open('get', 'controller/logininfo.php?Login=IsUserLogged&nocache = ' + nocache);
         http.onreadystatechange = RedirectReply;
         http.send(null);
    }
}

function RedirectReply() {
    if (http.readyState == 4) {
        var UserId = 0;
        var response = http.responseText;
        UserId = response;
        if (UserId == 0) {
                window.location = "login.html";
        }
        else{
           LoadPostRequirementData();
        }
        }

    }



function containsAlphabets(checkString) {
        var tempString="";
        var regExp = /^[A-Za-z]$/;
        if(checkString != null && checkString != "")
        {
          for(var i = 0; i < checkString.length; i++)
          { 
            if (!checkString.charAt(i).match(regExp))
            {
              return true;
            }
          }
        }
        else
        {
          return false;
        }
        return false;
}



function Annamalaiyar_Menubar() {
    var sHTML = "";
     sHTML = sHTML + "<div class='chromestyle' id='chromemenu'>";
        sHTML = sHTML + "<ul>";
        sHTML = sHTML + "<li><b><a href='/index.html'>HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/annamalaiyarenclave/home.html' title='sell apartment'>Annamalaiyar Enclave - HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/annamalaiyarenclave/specification.html' title='property specification'>SPECIFICATION</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/annamalaiyarenclave/routemap.html' title='route of apartment'>ROUTE MAP</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/annamalaiyarenclave/plan.html' title='plan of apartments'>PLAN</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../contactus.php' title='Real Estate contact'>CONTACT US</a></b></li>";
        sHTML = sHTML + "</ul></div>";
    document.write(sHTML);
    cssdropdown.startchrome("chromemenu");
}

function Ponazhagi_Menubar()
{
var sHTML = "";
     sHTML = sHTML + "<div class='chromestyle' id='chromemenu'>";
        sHTML = sHTML + "<ul>";
        sHTML = sHTML + "<li><b><a href='/index.html'>HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/ponnazhaki/home.html' title='Apartment property'>Ponnazhaki - HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/ponnazhaki/specification.html' title='Property Specification'>SPECIFICATION</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/ponnazhaki/routemap.html' title='Route Map of Property'>ROUTE MAP</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/ponnazhaki/plan.html' title='property Key plan '>PLAN</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../contactus.php' title='Contact Property details'>CONTACT US</a></b></li>";
        sHTML = sHTML + "</ul></div>";
    document.write(sHTML);
    cssdropdown.startchrome("chromemenu");
}

function KGHome_Menubar()
{
var sHTML = "";
     sHTML = sHTML + "<div class='chromestyle' id='chromemenu'>";
        sHTML = sHTML + "<ul>";
        sHTML = sHTML + "<li><b><a href='/index.html' title='K.G Home'>HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/kghomes/index.html' title='Home'>KG Homes - HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/kghomes/specifications.html' title='Specification'>Specifications</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/kghomes/routemap.html' title='Route Map of Property'>ROUTE MAP</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/kghomes/plan.html' title='property Key plan '>PLAN</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../contactus.php' title='Contact Property details'>CONTACT US</a></b></li>";
        sHTML = sHTML + "</ul></div>";
    document.write(sHTML);
    cssdropdown.startchrome("chromemenu");
}

function AvenaApartment_Menubar()
{
var sHTML = "";
     sHTML = sHTML + "<div class='chromestyle' id='chromemenu'>";
        sHTML = sHTML + "<ul>";
        sHTML = sHTML + "<li><b><a href='/index.html' title='K.G Home'>HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/avena/index.html' title='Home'>Avena Apartment - HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/avena/specification.html' title='Specification'>Specifications</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/avena/routemap.html' title='Route Map of Property'>ROUTE MAP</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/avena/plana.html' title='property Key plan'>PLAN</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/avena/blockdetails.html' title='property Key plan '>Block Details</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/avena/paymentstage.html' title='Payment stage of Property '>Payment Stage</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../contactus.php' title='Contact Property details'>CONTACT US</a></b></li>";
        sHTML = sHTML + "</ul></div>";
    document.write(sHTML);
    cssdropdown.startchrome("chromemenu");
}


function AmpujamApartment_Menubar()
{
var sHTML = "";
     sHTML = sHTML + "<div class='chromestyle' id='chromemenu'>";
        sHTML = sHTML + "<ul>";
        sHTML = sHTML + "<li><b><a href='/index.html' title='Ambujam Apartments'>HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/ambujam/index.html' title='Home'>Ambujam Apartments - HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/ambujam/specification.html' title='Specification'>Specifications</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/ambujam/routemap.html' title='Route Map of Property'>ROUTE MAP</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/ambujam/mainplan.html' title='property Key plan '>PLAN</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/ambujam/paymentstage.html' title='Payment Stage of Property '>Payment Stage</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../contactus.php' title='Contact Property details'>CONTACT US</a></b></li>";
        sHTML = sHTML + "</ul></div>";
    document.write(sHTML);
    cssdropdown.startchrome("chromemenu");
}
function PPS_Menubar()
{
var sHTML = "";
     sHTML = sHTML + "<div class='chromestyle' id='chromemenu'>";
        sHTML = sHTML + "<ul>";
        sHTML = sHTML + "<li><b><a href='/index.html' title='PPS Foundations'>HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/pps/index.html' title='Home'>PPS FOUNDATION - HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/pps/specification.html' title='Specifications'>SPECIFICATIONS</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/pps/routemap.html' title='Route Map of Property'>ROUTE MAP</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/pps/mainplan.html' title='property Key plan '>PLAN</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/pps/areadetails.html' title='Payment Stage of Property '>AREA DETAILS</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/pps/contactus.html' title='Contact Property details'>CONTACT US</a></b></li>";
        sHTML = sHTML + "</ul></div>";
    document.write(sHTML);
    cssdropdown.startchrome("chromemenu");
}

function DolphinApartment_Menubar()
{
var sHTML = "";
     sHTML = sHTML + "<div class='chromestyle' id='chromemenu'>";
        sHTML = sHTML + "<ul>";
        sHTML = sHTML + "<li><b><a href='/index.html' title='Ambujam Apartments'>HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/dolphinapartments/index.html' title='Home'>DOLPHIN APARTMENTS - HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/dolphinapartments/specification.html' title='Specification'>SPECIFICATIONS</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/dolphinapartments/routemap.html' title='Route Map of Property'>ROUTE MAP</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/dolphinapartments/contactus.html' title='Contact Property details'>CONTACT US</a></b></li>";
        sHTML = sHTML + "</ul></div>";
    document.write(sHTML);
    cssdropdown.startchrome("chromemenu");
}

function IndependantHouse_Menubar()
{
var sHTML = "";
     sHTML = sHTML + "<div class='chromestyle' id='chromemenu'>";
        sHTML = sHTML + "<ul>";
        sHTML = sHTML + "<li><b><a href='/index.html' title='Ambujam Apartments'>HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../independent-houses/thanthaipriyarnagar/index.html' title='Home'>Independent House - HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../independent-houses/thanthaipriyarnagar/specification.html' title='Specification'>Specification</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../independent-houses/thanthaipriyarnagar/floorplan.html' title='Floor Plan'>Floor Plan</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../independent-houses/thanthaipriyarnagar/Video.html' title='Home'>Video</a></b></li>";
        
        sHTML = sHTML + "<li><b><a href='../../contactus.php' title='Contact Property details'>CONTACT US</a></b></li>";
        sHTML = sHTML + "</ul></div>";
    document.write(sHTML);
    cssdropdown.startchrome("chromemenu");
}


function Annainagar_Menubar()
{
var sHTML = "";
     sHTML = sHTML + "<div class='chromestyle' id='chromemenu'>";
        sHTML = sHTML + "<ul>";
        sHTML = sHTML + "<li><b><a href='/index.html' title='Annai Nagar Plots'>HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/annainagar/index.html' title='Home'>Annai Nagar Plots - HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/annainagar/plotlayout.html' title='Plotlayout of Property'>PLOT LAYOUT</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/annainagar/routemap.html' title='Route Map of Property'>ROUTE MAP</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/annainagar/areadetail.html' title='Area Detail'>AREA DETAIL</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../contactus.php' title='Contact Property details'>CONTACT US</a></b></li>";
        sHTML = sHTML + "</ul></div>";
    document.write(sHTML);
    cssdropdown.startchrome("chromemenu");
}
function subshree_Menubar()
{
var sHTML = "";
     sHTML = sHTML + "<div class='chromestyle' id='chromemenu'>";
        sHTML = sHTML + "<ul>";
        sHTML = sHTML + "<li><b><a href='/index.html' title='Annai Nagar Plots'>HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/subshreevalarolinagar/index.html' title='Home'>SUBSHREE VALAROLI NAGAR- HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/subshreevalarolinagar/plotlayout.html' title='Plotlayout of Property'>PLOT LAYOUT</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/subshreevalarolinagar/routemap.html' title='Route Map of Property'>ROUTE MAP</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/subshreevalarolinagar/areadetail.html' title='Area Detail'>BLOCK DETAILS</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../contactus.php' title='Contact Property details'>CONTACT US</a></b></li>";
        sHTML = sHTML + "</ul></div>";
    document.write(sHTML);
    cssdropdown.startchrome("chromemenu");
}
function annamalayarnagar_Menubar()
{
var sHTML = "";
     sHTML = sHTML + "<div class='chromestyle' id='chromemenu'>";
        sHTML = sHTML + "<ul>";
        sHTML = sHTML + "<li><b><a href='/index.html' title='Annamalayar Nagar Plots'>HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../plots/annamalayar/index.html' title='Home'>ANNAMALAYAR NAGAR- HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../plots/annamalayar/plotlayout.html' title='Plotlayout of Property'>PLOT LAYOUT</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../plots/annamalayar/routemap.html' title='Route Map of Property'>ROUTE MAP</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../plots/annamalayar/areadetail.html' title='Area Detail'>BLOCK DETAILS</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../plots/annamalayar/contactus.html' title='Contact Property details'>CONTACT US</a></b></li>";
        sHTML = sHTML + "</ul></div>";
    document.write(sHTML);
    cssdropdown.startchrome("chromemenu");
}
function MeenusEnclave_Menubar()
{
var sHTML = "";
     sHTML = sHTML + "<div class='chromestyle' id='chromemenu'>";
        sHTML = sHTML + "<ul>";
        sHTML = sHTML + "<li><b><a href='/index.html' title='Annai Nagar Plots'>HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/meenus_enclave/index.html' title='Home'>Meenu's Enclave - HOME</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/meenus_enclave/routemap.html' title='Route Map of Property'>ROUTE MAP</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/meenus_enclave/stilt_floor_plan.html' title='Area Detail'>Stilt Floor Plan</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../apartments/meenus_enclave/typical_floor_plan.html' title='Area Detail'>Typical Floor Plan</a></b></li>";
        sHTML = sHTML + "<li><b><a href='../../contactus.php' title='Contact Property details'>CONTACT US</a></b></li>";
        sHTML = sHTML + "</ul></div>";
    document.write(sHTML);
    cssdropdown.startchrome("chromemenu");
}

function Apartment_footer() {
    var sHtml = '';
    sHtml = sHtml + '<div style="text-align:center;" class="footer" style="width:550px">';
    sHtml = sHtml + '<a href="/privacy-policy.html" title="Property Privacy">Privacy</a>&nbsp;|&nbsp; <a href="/terms-of-use.html" title="Terms and Conditions">Terms of Use</a>&nbsp;|&nbsp;';
    sHtml = sHtml + '<a href="/kkdi-properties-career.html" title="Property information">Careers</a>&nbsp;|&nbsp;<a href="/calculators.html" title="Buy, sell, rent, property calculator">Calculators</a>&nbsp;|&nbsp; <a href="http://www.karaikudiproperties.com/adviceandopinions" target="blank" title="Property Legal, vasthu, opinion">';
    sHtml = sHtml + 'Advice & Opinions</a>&nbsp;|&nbsp;<a href="/housingloan-documents.html" title="Housing Loan documents Requirements">Housing Loan</a>&nbsp;|&nbsp; <a href="/weblinks.html" title="Registration guidelines">Web links</a>';
    sHtml = sHtml + '&nbsp;| <a href="/karaikudi-properties-rssfeed.html"><img src="../../images/feed.png" style="border:1px;vertical-align:middle"></a>';
   sHtml = sHtml + '<div style="text-align:center">Copyright &copy; 2010, Karaikudi Properties a Trademark of <a href="http://www.wbcsoftwarelab.com/" target="_blank" title="Wbc Software Lab">WBC Software Lab</a>.</div>';
   sHtml = sHtml + '<div style="text-align:center">Design / Development by <a href="http://www.wbcsoftwarelab.com/" target="_blank" title="Staff Services">WBC Software Lab </a></div>';
    sHtml = sHtml + '</div>';
    document.write(sHtml);
}


 var keyStr = "ABCDEFGHIJKLMNOP" +
                 "QRSTUVWXYZabcdef" +
               "ghijklmnopqrstuv" +
                 "wxyz0123456789+/" +
                  "=";
    
    function encode64(input) {
     input = escape(input);
       var output = "";
        var chr1, chr2, chr3 = "";
        var enc1, enc2, enc3, enc4 = "";
      var i = 0;
  
     do {
           chr1 = input.charCodeAt(i++);
           chr2 = input.charCodeAt(i++);
           chr3 = input.charCodeAt(i++);
    
          enc1 = chr1 >> 2;
           enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
         enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
          enc4 = chr3 & 63;
   
           if (isNaN(chr2)) {
             enc3 = enc4 = 64;
           } else if (isNaN(chr3)) {
              enc4 = 64;
          }
    
           output = output +
             keyStr.charAt(enc1) +
           keyStr.charAt(enc2) +
              keyStr.charAt(enc3) +
             keyStr.charAt(enc4);
          chr1 = chr2 = chr3 = "";
           enc1 = enc2 = enc3 = enc4 = "";
        } while (i < input.length);
    
        return output;
   }
  
    function decode64(input) {
        var output = "";
       var chr1, chr2, chr3 = "";
        var enc1, enc2, enc3, enc4 = "";
        var i = 0;
   
       // remove all characters that are not A-Z, a-z, 0-9, +, /, or =
      var base64test = /[^A-Za-z0-9\+\/\=]/g;
//       if (base64test.exec(input)) {
//          alert("There were invalid base64 characters in the input text.\n" +
//                 "Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\n" +
//                 "Expect errors in decoding.");
//        }
      input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
   
       do {
         enc1 = keyStr.indexOf(input.charAt(i++));
         enc2 = keyStr.indexOf(input.charAt(i++));
           enc3 = keyStr.indexOf(input.charAt(i++));
         enc4 = keyStr.indexOf(input.charAt(i++));
    
         chr1 = (enc1 << 2) | (enc2 >> 4);
           chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
         chr3 = ((enc3 & 3) << 6) | enc4;
    
         output = output + String.fromCharCode(chr1);
   
           if (enc3 != 64) {
            output = output + String.fromCharCode(chr2);
         }
           if (enc4 != 64) {
             output = output + String.fromCharCode(chr3);
          }
    
          chr1 = chr2 = chr3 = "";
         enc1 = enc2 = enc3 = enc4 = "";
  
      } while (i < input.length);
   
     return unescape(output);
}
    
function anchorClick(element)
{
    var href = "";var nTemp="";
    var strPathname;
    href= document.location.protocol  + "//" + document.location.host;
    strPathname=element.href.substring(element.href.lastIndexOf("/")+1);
    if(strPathname=="MA==")
        nTemp=encode64('00');
    else if(strPathname=="MAk==")
        nTemp=encode64("01");
    else if(strPathname=="yAek==")
        nTemp=encode64("02");
    else if(strPathname=="pker==")
        nTemp=encode64("03");
    else if(strPathname=="kVXEE==")
        nTemp=encode64("03");
    href=href+"/"+"login.html?"+nTemp;
    element.setAttribute('href', href);

}

function apartmentClick(element)
{
    var href = "";var nTemp="";
    var strPathname;
    href= document.location.protocol  + "//" + document.location.host;
    strPathname=element.href.substring(element.href.lastIndexOf("/")+1);
    if(strPathname=="kVXEE=")
        nTemp=encode64('AnnamalaiyarEnclave');
    else if(strPathname=="kVXEEA=")
        nTemp=encode64("AlagappaEnclave");
    else if(strPathname=="kVZXEEA==")
        nTemp=encode64("Ponnazhaki");
    else if(strPathname=="kVXEGA=")
        nTemp=encode64("SubbiahAmbalamNagar");
    else if(strPathname=="CRXEGA=")
        nTemp=encode64("AnnaiTherasaNagar");
    else if(strPathname=="XEWQASD")
        nTemp=encode64("KVStreet");
    else if(strPathname=="BECVTYU")
        nTemp=encode64("KVStreet");
    else if(strPathname=="JWERFCV==")
        nTemp=encode64("IndependentHouses");
    else if(strPathname=="YTJWERFCV==")
        nTemp=encode64("BharathNagar");
    else if(strPathname=="KRTCVXE")
        nTemp=encode64("KG Homes");
    href=href+"/"+"tellafriend.html?"+nTemp;
    element.setAttribute('href', href);
}


function Instructions_Notes()
{
    var sHtml='';
    sHtml=sHtml+'<div>';
    sHtml = sHtml + '<span class="note_title">Note:</span>';
    sHtml = sHtml + '<span class="note">The Specifications are for information only, which are subject to change without notice.';
    sHtml = sHtml + ' Visitors are requested to take necessary care and be responsible for their purchase decision at their own will.</span>';
    sHtml = sHtml + '</div>';
    document.write(sHtml);
}

function Kottaiyur_House_Notes()
{
    var sHtml='';
    sHtml=sHtml+'<div>';
    sHtml = sHtml + '<span class="note_title">Note:</span>';
    sHtml = sHtml + '<span class="note"> All information are orally collected information, need to check the documents legality.</span>';
    sHtml = sHtml + '</div>';
    document.write(sHtml);
}


