var prefsLoaded=false;var defaultFontSize=76;var currentFontSize=defaultFontSize;function revertStyles(){currentFontSize=defaultFontSize;changeFontSize(0);}
function toggleColors(){if(currentStyle=="White"){setColor("Black");}else{setColor("White");}}
function changeFontSize(sizeDifference){currentFontSize=parseInt(currentFontSize)+parseInt(sizeDifference*5);if(currentFontSize>100){currentFontSize=100;}else if(currentFontSize<60){currentFontSize=60;}
setFontSize(currentFontSize);};function setFontSize(fontSize){var stObj=(document.getElementById)?document.getElementById('content_area'):document.all('content_area');document.body.style.fontSize=fontSize+'%';};function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}
else expires="";document.cookie=name+"="+value+expires+"; path=/";};function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;};window.onload=setUserOptions;function setUserOptions(){if(!prefsLoaded){cookie=readCookie("fontSize");currentFontSize=cookie?cookie:defaultFontSize;setFontSize(currentFontSize);prefsLoaded=true;}}
window.onunload=saveSettings;function saveSettings()
{createCookie("fontSize",currentFontSize,365);}
function Validator(frmname)
{this.formobj=document.forms[frmname];if(!this.formobj)
{alert("BUG: Could not get Form object "+frmname);return;}
if(this.formobj.onsubmit)
{this.formobj.old_onsubmit=this.formobj.onsubmit;this.formobj.onsubmit=null;}
else
{this.formobj.old_onsubmit=null;}
this.formobj.onsubmit=form_submit_handler;this.addValidation=add_validation;this.setAddnlValidationFunction=set_addnl_vfunction;this.clearAllValidations=clear_all_validations;}
function set_addnl_vfunction(functionname)
{this.formobj.addnlvalidation=functionname;}
function clear_all_validations()
{for(var itr=0;itr<this.formobj.elements.length;itr++)
{this.formobj.elements[itr].validationset=null;}}
function form_submit_handler()
{for(var itr=0;itr<this.elements.length;itr++)
{if(this.elements[itr].validationset&&!this.elements[itr].validationset.validate())
{return false;}}
if(this.addnlvalidation)
{str=" var ret = "+this.addnlvalidation+"()";eval(str);if(!ret)return ret;}
return true;}
function add_validation(itemname,descriptor,errstr)
{if(!this.formobj)
{alert("BUG: the form object is not set properly");return;}
var itemobj=this.formobj[itemname];if(!itemobj)
{alert("BUG: Couldnot get the input object named: "+itemname);return;}
if(!itemobj.validationset)
{itemobj.validationset=new ValidationSet(itemobj);}
itemobj.validationset.add(descriptor,errstr);}
function ValidationDesc(inputitem,desc,error)
{this.desc=desc;this.error=error;this.itemobj=inputitem;this.validate=vdesc_validate;}
function vdesc_validate()
{if(!V2validateData(this.desc,this.itemobj,this.error))
{this.itemobj.focus();return false;}
return true;}
function ValidationSet(inputitem)
{this.vSet=new Array();this.add=add_validationdesc;this.validate=vset_validate;this.itemobj=inputitem;}
function add_validationdesc(desc,error)
{this.vSet[this.vSet.length]=new ValidationDesc(this.itemobj,desc,error);}
function vset_validate()
{for(var itr=0;itr<this.vSet.length;itr++)
{if(!this.vSet[itr].validate())
{return false;}}
return true;}
function validateEmailv2(email)
{if(email.length<=0)
{return true;}
var splitted=email.match("^(.+)@(.+)$");if(splitted==null)return false;if(splitted[1]!=null)
{var regexp_user=/^\"?[\w-_\.]*\"?$/;if(splitted[1].match(regexp_user)==null)return false;}
if(splitted[2]!=null)
{var regexp_domain=/^[\w-\.]*\.[A-Za-z]{2,4}$/;if(splitted[2].match(regexp_domain)==null)
{var regexp_ip=/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;if(splitted[2].match(regexp_ip)==null)return false;}
return true;}
return false;}
function V2validateData(strValidateStr,objValue,strError)
{var epos=strValidateStr.search("=");var command="";var cmdvalue="";if(epos>=0)
{command=strValidateStr.substring(0,epos);cmdvalue=strValidateStr.substr(epos+1);}
else
{command=strValidateStr;}
switch(command)
{case"date":{if(eval(objValue.value.length)>0)
{if(ValidateDate(objValue.value,"yyyy-mm-dd")==false)
{if(!strError||strError.length==0)
{strError=objValue.name+" : Format is not correct";}
alert(strError);return false;}}
break;}
case"req":case"required":{if(eval(objValue.value.length)==0)
{if(!strError||strError.length==0)
{strError=objValue.name+" : Required Field";}
alert(strError);return false;}
break;}
case"maxlength":case"maxlen":{if(eval(objValue.value.length)>eval(cmdvalue))
{if(!strError||strError.length==0)
{strError=objValue.name+" : "+cmdvalue+" characters maximum ";}
alert(strError+"\n[Current length = "+objValue.value.length+" ]");return false;}
break;}
case"minlength":case"minlen":{if(eval(objValue.value.length)<eval(cmdvalue))
{if(!strError||strError.length==0)
{strError=objValue.name+" : "+cmdvalue+" characters minimum  ";}
alert(strError+"\n[Current length = "+objValue.value.length+" ]");return false;}
break;}
case"alnum":case"alphanumeric":{var charpos=objValue.value.search("[^A-Za-z0-9]");if(objValue.value.length>0&&charpos>=0)
{if(!strError||strError.length==0)
{strError=objValue.name+": Only alpha-numeric characters allowed ";}
alert(strError+"\n [Error character position "+eval(charpos+1)+"]");return false;}
break;}
case"num":case"numeric":{var charpos=objValue.value.search("[^0-9]");if(objValue.value.length>0&&charpos>=0)
{if(!strError||strError.length==0)
{strError=objValue.name+": Only digits allowed ";}
alert(strError+"\n [Error character position "+eval(charpos+1)+"]");return false;}
break;}
case"alphabetic":case"alpha":{var charpos=objValue.value.search("[^A-Za-z]");if(objValue.value.length>0&&charpos>=0)
{if(!strError||strError.length==0)
{strError=objValue.name+": Only alphabetic characters allowed ";}
alert(strError+"\n [Error character position "+eval(charpos+1)+"]");return false;}
break;}
case"alnumhyphen":{var charpos=objValue.value.search("[^A-Za-z0-9\-_]");if(objValue.value.length>0&&charpos>=0)
{if(!strError||strError.length==0)
{strError=objValue.name+": characters allowed are A-Z,a-z,0-9,- and _";}
alert(strError+"\n [Error character position "+eval(charpos+1)+"]");return false;}
break;}
case"email":{if(!validateEmailv2(objValue.value))
{if(!strError||strError.length==0)
{strError=objValue.name+": Enter a valid Email address ";}
alert(strError);return false;}
break;}
case"lt":case"lessthan":{if(isNaN(objValue.value))
{alert(objValue.name+": Should be a number ");return false;}
if(eval(objValue.value)>=eval(cmdvalue))
{if(!strError||strError.length==0)
{strError=objValue.name+" : value should be less than "+cmdvalue;}
alert(strError);return false;}
break;}
case"gt":case"greaterthan":{if(isNaN(objValue.value))
{alert(objValue.name+": Should be a number ");return false;}
if(eval(objValue.value)<=eval(cmdvalue))
{if(!strError||strError.length==0)
{strError=objValue.name+" : value should be greater than "+cmdvalue;}
alert(strError);return false;}
break;}
case"regexp":{if(objValue.value.length>0)
{if(!objValue.value.match(cmdvalue))
{if(!strError||strError.length==0)
{strError=objValue.name+": Invalid characters found ";}
alert(strError);return false;}}
break;}
case"dontselect":{if(objValue.selectedIndex==null)
{alert("BUG: dontselect command for non-select Item");return false;}
if(objValue.selectedIndex==eval(cmdvalue))
{if(!strError||strError.length==0)
{strError=objValue.name+": Please Select one option ";}
alert(strError);return false;}
break;}}
return true;}
function DoCustomValidationEmail(){var frm=document.forms["myform"];if(frm.email.value!=frm.email2.value){alert('The Email and Confirmation Email do not match!');return false;}
else{return true;}}
function DoCustomValidationCheckbox()
{var frm=document.forms["quoteform"];if(!frm.designtype1.checked)
{alert('The checkbox is not checked!');return false;}
else
{return true;}}
function show_photo(what,photo,title,desc){document.standard_photo.src='components/com_propertylab/images/standard/'+photo;document.standard_photo.alt=title;}
function stripCharacter(words,character){var spaces=words.length;for(var x=1;x<spaces;++x){words=words.replace(character,"");}
return words;}
function changecss(theClass,element,value){var cssRules;if(document.all){cssRules='rules';}
else if(document.getElementById){cssRules='cssRules';}
for(var S=0;S<document.styleSheets.length;S++){for(var R=0;R<document.styleSheets[S][cssRules].length;R++){if(document.styleSheets[S][cssRules][R].selectorText==theClass){document.styleSheets[S][cssRules][R].style[element]=value;}}}}
function checkUncheckAll(theElement){var theForm=theElement.form,z=0;for(z=0;z<theForm.length;z++){if(theForm[z].type=='checkbox'&&theForm[z].name!='checkall'){theForm[z].checked=theElement.checked;}}}
function changeImgSize(objectId,newWidth,newHeight){imgString='theImg = document.getElementById("'+objectId+'")';eval(imgString);oldWidth=theImg.width;oldHeight=theImg.height;if(newWidth>0){theImg.width=newWidth;}
if(newHeight>0){theImg.height=newHeight;}}
function changeColor(theObj,newColor){eval('var theObject = document.getElementById("'+theObj+'")');if(theObject.style.backgroundColor==null){theBG='white';}else{theBG=theObject.style.backgroundColor;}
if(theObject.style.color==null){theColor='black';}else{theColor=theObject.style.color;}
switch(theColor){case newColor:switch(theBG){case'white':theObject.style.color='black';break;case'black':theObject.style.color='white';break;default:theObject.style.color='black';break;}
break;default:theObject.style.color=newColor;break;}}
if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",_7);this.setAttribute("doExpressInstall",false);var _d=(_9)?_9:window.location;this.setAttribute("xiRedirectUrl",_d);this.setAttribute("redirectUrl","");if(_a){this.setAttribute("redirectUrl",_a);}};deconcept.SWFObject.prototype={setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16.push(key+"="+_18[key]);}
return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=key+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}
_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}
_19+="</object>";}
return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}
catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}
catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
catch(e){}}
if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
return _23;};deconcept.PlayerVersion=function(_27){this.major=_27[0]!=null?parseInt(_27[0]):0;this.minor=_27[1]!=null?parseInt(_27[1]):0;this.rev=_27[2]!=null?parseInt(_27[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){return false;}
return true;};deconcept.util={getRequestParameter:function(_29){var q=document.location.search||document.location.hash;if(q){var _2b=q.substring(1).split("&");for(var i=0;i<_2b.length;i++){if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){return _2b[i].substring((_2b[i].indexOf("=")+1));}}}
return"";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2d=document.getElementsByTagName("OBJECT");for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){if(typeof _2d[i][x]=="function"){_2d[i][x]=null;}}}};if(typeof window.onunload=="function"){var oldunload=window.onunload;window.onunload=function(){deconcept.SWFObjectUtil.cleanupSWFs();oldunload();};}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}
if(Array.prototype.push==null){Array.prototype.push=function(_30){this[this.length]=_30;return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;function hasSupport(){if(typeof hasSupport.support!="undefined")
return hasSupport.support;var ie55=/msie 5\.[56789]/i.test(navigator.userAgent);hasSupport.support=(typeof document.implementation!="undefined"&&document.implementation.hasFeature("html","1.0")||ie55)
if(ie55){document._getElementsByTagName=document.getElementsByTagName;document.getElementsByTagName=function(sTagName){if(sTagName=="*")
return document.all;else
return document._getElementsByTagName(sTagName);};}
return hasSupport.support;}
function WebFXTabPane(el,bUseCookie){if(!hasSupport()||el==null)return;this.element=el;this.element.tabPane=this;this.pages=[];this.selectedIndex=null;this.useCookie=bUseCookie!=null?bUseCookie:true;this.element.className=this.classNameTag+" "+this.element.className;this.tabRow=document.createElement("div");this.tabRow.className="tab-row";el.insertBefore(this.tabRow,el.firstChild);var tabIndex=0;if(this.useCookie){tabIndex=Number(WebFXTabPane.getCookie("webfxtab_"+this.element.id));if(isNaN(tabIndex))
tabIndex=0;}
this.selectedIndex=tabIndex;var cs=el.childNodes;var n;for(var i=0;i<cs.length;i++){if(cs[i].nodeType==1&&cs[i].className=="tab-page"){this.addTabPage(cs[i]);}}}
WebFXTabPane.prototype.classNameTag="dynamic-tab-pane-control";WebFXTabPane.prototype.setSelectedIndex=function(n){if(this.selectedIndex!=n){if(this.selectedIndex!=null&&this.pages[this.selectedIndex]!=null)
this.pages[this.selectedIndex].hide();this.selectedIndex=n;this.pages[this.selectedIndex].show();if(this.useCookie)
WebFXTabPane.setCookie("webfxtab_"+this.element.id,n);}};WebFXTabPane.prototype.getSelectedIndex=function(){return this.selectedIndex;};WebFXTabPane.prototype.addTabPage=function(oElement){if(!hasSupport())return;if(oElement.tabPage==this)
return oElement.tabPage;var n=this.pages.length;var tp=this.pages[n]=new WebFXTabPage(oElement,this,n);tp.tabPane=this;this.tabRow.appendChild(tp.tab);if(n==this.selectedIndex)
tp.show();else
tp.hide();return tp;};WebFXTabPane.prototype.dispose=function(){this.element.tabPane=null;this.element=null;this.tabRow=null;for(var i=0;i<this.pages.length;i++){this.pages[i].dispose();this.pages[i]=null;}
this.pages=null;};WebFXTabPane.setCookie=function(sName,sValue,nDays){var expires="";if(nDays){var d=new Date();d.setTime(d.getTime()+nDays*24*60*60*1000);expires="; expires="+d.toGMTString();}
document.cookie=sName+"="+sValue+expires+"; path=/";};WebFXTabPane.getCookie=function(sName){var re=new RegExp("(\;|^)[^;]*("+sName+")\=([^;]*)(;|$)");var res=re.exec(document.cookie);return res!=null?res[3]:null;};WebFXTabPane.removeCookie=function(name){setCookie(name,"",-1);};function WebFXTabPage(el,tabPane,nIndex){if(!hasSupport()||el==null)return;this.element=el;this.element.tabPage=this;this.index=nIndex;var cs=el.childNodes;for(var i=0;i<cs.length;i++){if(cs[i].nodeType==1&&cs[i].className=="tab"){this.tab=cs[i];break;}}
var a=document.createElement("A");this.aElement=a;a.href="#";a.onclick=function(){return false;};while(this.tab.hasChildNodes())
a.appendChild(this.tab.firstChild);this.tab.appendChild(a);var oThis=this;this.tab.onclick=function(){oThis.select();};this.tab.onmouseover=function(){WebFXTabPage.tabOver(oThis);};this.tab.onmouseout=function(){WebFXTabPage.tabOut(oThis);};}
WebFXTabPage.prototype.show=function(){var el=this.tab;var s=el.className+" selected";s=s.replace(/ +/g," ");el.className=s;this.element.style.display="block";};WebFXTabPage.prototype.hide=function(){var el=this.tab;var s=el.className;s=s.replace(/ selected/g,"");el.className=s;this.element.style.display="none";};WebFXTabPage.prototype.select=function(){this.tabPane.setSelectedIndex(this.index);};WebFXTabPage.prototype.dispose=function(){this.aElement.onclick=null;this.aElement=null;this.element.tabPage=null;this.tab.onclick=null;this.tab.onmouseover=null;this.tab.onmouseout=null;this.tab=null;this.tabPane=null;this.element=null;};WebFXTabPage.tabOver=function(tabpage){var el=tabpage.tab;var s=el.className+" hover";s=s.replace(/ +/g," ");el.className=s;};WebFXTabPage.tabOut=function(tabpage){var el=tabpage.tab;var s=el.className;s=s.replace(/ hover/g,"");el.className=s;};function setupAllTabs(){if(!hasSupport())return;var all=document.getElementsByTagName("*");var l=all.length;var tabPaneRe=/tab\-pane/;var tabPageRe=/tab\-page/;var cn,el;var parentTabPane;for(var i=0;i<l;i++){el=all[i]
cn=el.className;if(cn=="")continue;if(tabPaneRe.test(cn)&&!el.tabPane)
new WebFXTabPane(el);else if(tabPageRe.test(cn)&&!el.tabPage&&tabPaneRe.test(el.parentNode.className)){el.parentNode.tabPane.addTabPage(el);}}}
function disposeAllTabs(){if(!hasSupport())return;var all=document.getElementsByTagName("*");var l=all.length;var tabPaneRe=/tab\-pane/;var cn,el;var tabPanes=[];for(var i=0;i<l;i++){el=all[i]
cn=el.className;if(cn=="")continue;if(tabPaneRe.test(cn)&&el.tabPane)
tabPanes[tabPanes.length]=el.tabPane;}
for(var i=tabPanes.length-1;i>=0;i--){tabPanes[i].dispose();tabPanes[i]=null;}}
if(typeof window.addEventListener!="undefined")
window.addEventListener("load",setupAllTabs,false);else if(typeof window.attachEvent!="undefined"){window.attachEvent("onload",setupAllTabs);window.attachEvent("onunload",disposeAllTabs);}
else{if(window.onload!=null){var oldOnload=window.onload;window.onload=function(e){oldOnload(e);setupAllTabs();};}
else
window.onload=setupAllTabs;}
function changeDivHeight(){var j=document.documentElement.clientHeight;document.getElementById('fullheight').style.height=(j-252)+"px";}
onload=changeDivHeight;onresize=changeDivHeight;