function sack(file){this.xmlhttp=null;this.resetData=function(){this.method="POST";this.queryStringSeparator="?";this.argumentSeparator="&";this.URLString="";this.encodeURIString=true;this.execute=false;this.element=null;this.elementObj=null;this.requestFile=file;this.vars=new Object();this.responseStatus=new Array(2)};this.resetFunctions=function(){this.onLoading=function(){};this.onLoaded=function(){};this.onInteractive=function(){};this.onCompletion=function(){};this.onError=function(){};this.onFail=function(){}};this.reset=function(){this.resetFunctions();this.resetData()};this.createAJAX=function(){try{this.xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(e1){try{this.xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(e2){this.xmlhttp=null}}if(!this.xmlhttp){if(typeof XMLHttpRequest!="undefined"){this.xmlhttp=new XMLHttpRequest()}else{this.failed=true}}};this.setVar=function(name,value){this.vars[name]=Array(value,false)};this.encVar=function(name,value,returnvars){if(true==returnvars){return Array(encodeURIComponent(name),encodeURIComponent(value))}else{this.vars[encodeURIComponent(name)]=Array(encodeURIComponent(value),true)}};this.processURLString=function(string,encode){encoded=encodeURIComponent(this.argumentSeparator);regexp=new RegExp(this.argumentSeparator+"|"+encoded);varArray=string.split(regexp);for(i=0;i<varArray.length;i++){urlVars=varArray[i].split("=");if(true==encode){this.encVar(urlVars[0],urlVars[1])}else{this.setVar(urlVars[0],urlVars[1])}}};this.createURLString=function(urlstring){if(this.encodeURIString&&this.URLString.length){this.processURLString(this.URLString,true)}if(urlstring){if(this.URLString.length){this.URLString+=this.argumentSeparator+urlstring}else{this.URLString=urlstring}}this.setVar("rndval",new Date().getTime());urlstringtemp=new Array();for(key in this.vars){if(false==this.vars[key][1]&&true==this.encodeURIString){encoded=this.encVar(key,this.vars[key][0],true);delete this.vars[key];this.vars[encoded[0]]=Array(encoded[1],true);key=encoded[0]}urlstringtemp[urlstringtemp.length]=key+"="+this.vars[key][0]}if(urlstring){this.URLString+=this.argumentSeparator+urlstringtemp.join(this.argumentSeparator)}else{this.URLString+=urlstringtemp.join(this.argumentSeparator)}};this.runResponse=function(){eval(this.response)};this.runAJAX=function(urlstring){if(this.failed){this.onFail()}else{this.createURLString(urlstring);if(this.element){this.elementObj=document.getElementById(this.element)}if(this.xmlhttp){var self=this;if(this.method=="GET"){totalurlstring=this.requestFile+this.queryStringSeparator+this.URLString;this.xmlhttp.open(this.method,totalurlstring,true)}else{this.xmlhttp.open(this.method,this.requestFile,true);try{this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}catch(e){}}this.xmlhttp.onreadystatechange=function(){switch(self.xmlhttp.readyState){case 1:self.onLoading();break;case 2:self.onLoaded();break;case 3:self.onInteractive();break;case 4:self.response=self.xmlhttp.responseText;self.responseXML=self.xmlhttp.responseXML;self.responseStatus[0]=self.xmlhttp.status;self.responseStatus[1]=self.xmlhttp.statusText;if(self.execute){self.runResponse()}if(self.elementObj){elemNodeName=self.elementObj.nodeName;elemNodeName.toLowerCase();if(elemNodeName=="input"||elemNodeName=="select"||elemNodeName=="option"||elemNodeName=="textarea"){self.elementObj.value=self.response}else{self.elementObj.innerHTML=self.response}}if(self.responseStatus[0]=="200"){self.onCompletion()}else{self.onError()}self.URLString="";break}};this.xmlhttp.send(this.URLString)}}};this.reset();this.createAJAX()}var enableCache=true;var jsCache=new Array();var dynamicContent_ajaxObjects=new Array();function ajax_showContent(A,D,B){var C=document.getElementById(A);C.innerHTML=dynamicContent_ajaxObjects[D].response;if(enableCache){jsCache[B]=dynamicContent_ajaxObjects[D].response}dynamicContent_ajaxObjects[D]=false;ajax_parseJs(C)}function ajax_loadContent(A,B){if(enableCache&&jsCache[B]){document.getElementById(A).innerHTML=jsCache[B];return }var C=dynamicContent_ajaxObjects.length;document.getElementById(A).innerHTML="Loading content - please wait";dynamicContent_ajaxObjects[C]=new sack();dynamicContent_ajaxObjects[C].requestFile=B;dynamicContent_ajaxObjects[C].onCompletion=function(){ajax_showContent(A,C,B)};dynamicContent_ajaxObjects[C].runAJAX()}function ajax_installScript(A){if(!A){return }if(window.execScript){window.execScript(A)}else{if(window.jQuery&&jQuery.browser.safari){window.setTimeout(A,0)}else{window.setTimeout(A,0)}}}function ajax_parseJs(F){var E=F.getElementsByTagName("SCRIPT");var B="";var D="";for(var G=0;G<E.length;G++){if(E[G].src){var C=document.getElementsByTagName("head")[0];var A=document.createElement("script");A.setAttribute("type","text/javascript");A.setAttribute("src",E[G].src)}else{if(navigator.userAgent.indexOf("Opera")>=0){D=D+E[G].text+"\n"}else{D=D+E[G].innerHTML}}}if(D){ajax_installScript(D)}}function Subsys_JsHttpRequest_Js(){this._construct()}(function(){var COUNT=0;var PENDING={};var CACHE={};Subsys_JsHttpRequest_Js.dataReady=function(id,text,js){var undef;var th=PENDING[id];delete PENDING[id];if(th){delete th._xmlReq;if(th.caching){CACHE[th.hash]=[text,js]}th._dataReady(text,js)}else{if(typeof (th)!=typeof (undef)){alert("ScriptLoader: unknown pending id: "+id)}}};Subsys_JsHttpRequest_Js.prototype={onreadystatechange:null,readyState:0,responseText:null,responseXML:null,status:200,statusText:"OK",session_name:"PHPSESSID",responseJS:null,caching:false,_span:null,_id:null,_xmlReq:null,_openArg:null,_reqHeaders:null,abort:function(){if(this._xmlReq){return this._xmlReq.abort()}if(this._span){this.readyState=0;if(this.onreadystatechange){this.onreadystatechange()}this._cleanupScript()}},open:function(method,url,asyncFlag,username,password){this._openArg={method:method,url:url,asyncFlag:asyncFlag,username:username,password:password};this._id=null;this._xmlReq=null;this._reqHeaders=[];return true},send:function(content){var id=(new Date().getTime())+""+COUNT++;var query=this._hash2query(content);var url=this._openArg.url;var sid=this._getSid();if(sid){url+=(url.indexOf("?")>=0?"&":"?")+this.session_name+"="+escape(sid)}var hash=this.hash=url+"?"+query;if(this.caching&&CACHE[hash]){var c=CACHE[hash];this._dataReady(c[0],c[1]);return false}this._xmlReq=this._obtainXmlReq(id,url);var hasSetHeader=this._xmlReq&&(window.ActiveXObject||this._xmlReq.setRequestHeader);var href,body;if(this._xmlReq&&hasSetHeader&&(""+this._openArg.method).toUpperCase()=="POST"){this._openArg.method="POST";href=url;body=query}else{this._openArg.method="GET";href=url+(url.indexOf("?")>=0?"&":"?")+query;body=null}href=href+(href.indexOf("?")>=0?"&":"?")+id;PENDING[id]=this;if(this._xmlReq){var a=this._openArg;this._xmlReq.open(a.method,href+"-xml",a.asyncFlag,a.username,a.password);if(hasSetHeader){for(var i=0;i<this._reqHeaders.length;i++){this._xmlReq.setRequestHeader(this._reqHeaders[i][0],this._reqHeaders[i][1])}this._xmlReq.setRequestHeader("Content-Type","application/octet-stream")}return this._xmlReq.send(body)}else{this._obtainScript(id,href);return true}},getAllResponseHeaders:function(){if(this._xmlReq){return this._xmlReq.getAllResponseHeaders()}return""},getResponseHeader:function(label){if(this._xmlReq){return this._xmlReq.getResponseHeader(label)}return""},setRequestHeader:function(label,value){this._reqHeaders[this._reqHeaders.length]=[label,value]},_construct:function(){},_dataReady:function(text,js){with(this){if(text!==null||js!==null){readyState=4;responseText=responseXML=text;responseJS=js}else{readyState=0;responseText=responseXML=responseJS=null}if(onreadystatechange){onreadystatechange()}_cleanupScript()}},_obtainXmlReq:function(id,url){if(url.match(new RegExp("^[a-z]+://","i"))){return null}var req=null;if(window.XMLHttpRequest){try{req=new XMLHttpRequest()}catch(e){}}else{if(window.ActiveXObject){try{req=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}if(!req){try{req=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}}}}if(req){var th=this;req.onreadystatechange=function(){if(req.readyState==4){var responseText=req.responseText;try{eval(responseText)}catch(e){Subsys_JsHttpRequest_Js.dataReady(id,"JavaScript code generated by backend is invalid!\n"+responseText,null)}}else{th.readyState=req.readyState;if(th.onreadystatechange){th.onreadystatechange()}}};this._id=id}return req},_obtainScript:function(id,href){with(document){var span=null;span=body.appendChild(createElement("SPAN"));span.style.display="none";span.innerHTML="Text for stupid IE.<script><\/script>";setTimeout(function(){var s=span.getElementsByTagName("script")[0];s.language="JavaScript";if(s.setAttribute){s.setAttribute("src",href)}else{s.src=href}},10);this._id=id;this._span=span}},_cleanupScript:function(){var span=this._span;if(span){this._span=null;setTimeout(function(){span.parentNode.removeChild(span)},50)}return false},_hash2query:function(content,prefix){if(prefix==null){prefix=""}var query=[];if(content instanceof Object){for(var k in content){var v=content[k];if(v.constructor.prototype[k]){continue}var curPrefix=prefix?prefix+"["+escape(k)+"]":escape(k);if(v instanceof Object){query[query.length]=this._hash2query(v,curPrefix)}else{query[query.length]=curPrefix+"="+escape(v)}}}else{query=[content]}return query.join("&")},_getSid:function(){var m=document.location.search.match(new RegExp("[&?]"+this.session_name+"=([^&?]*)"));var sid=null;if(m){sid=m[1]}else{var m=document.cookie.match(new RegExp(s="(;|^)\\s*"+this.session_name+"=([^;]*)"));if(m){sid=m[2]}}return sid}}})();var doCache=true;var frontendURL="http://www.toursegipto.com/front-end.php";var spyTimeout=250;window.onload=suggester_start;document.onkeydown=keyPressed;var oldText="";var requestCache=new Object;var inc=0;var typo;var completeDiv;var makeAutoComplete=true;var resultsContainerID="completeDiv";function suggester_start(){completeDiv=document.createElement("DIV");completeDiv.id=resultsContainerID;completeDiv.name=completeDiv.id;completeDiv.className="container";typo=document.getElementById(textInputID);if(null!=typo){with(completeDiv.style){top=getTop(typo)+typo.offsetHeight-1+"px";left=getLeft(typo)+"px";width=getWidth(typo,300)+"px";display="none"}document.body.appendChild(completeDiv);typo.select();completeDiv=document.getElementById(resultsContainerID);startSpy(typo)}else{alert("can NOT initialize results container!")}}function startSpy(){var A=document.getElementById(textInputID);if(null!=A){if(oldText!=A.value){if(""!=trim(A.value)){searchFor(A.value)}else{switchContainer(0);setTimeout("startSpy()",spyTimeout)}oldText=A.value}else{setTimeout("startSpy()",spyTimeout)}}}function searchFor(A){do_request({qu:A})}function processAnswer(C){if(null!=C){clearContainer();var A=false;theExp1=new RegExp("%index%","g");theExp2=new RegExp("%value%","g");for(i in C){if(doAutoComplete&&makeAutoComplete&&!A){var D=typo.value.length;typo.value=i;oldText=i;highlightText(typo,D);A=true}var B=i;if(null!=resultPattern&&""!=trim(resultPattern)){B=resultPattern;B=B.replace(theExp1,i);B=B.replace(theExp2,C[i])}addToContainer(B)}switchContainer(1)}setTimeout("startSpy()",spyTimeout)}function do_request(A){var B=new Subsys_JsHttpRequest_Js();B.serviceName=A.serviceName;B.onreadystatechange=function(){if(B.readyState==4){if(B.responseJS){processAnswer(B.responseJS.text)}}};B.caching=doCache;B.open("GET",frontendURL,true);B.send(A)}function compile_hash(B,D,A,C){return{ready:false,login:B,pass:D,service:A,serviceName:C}}function highlightText(C,A){if(C.createTextRange){var B=C.createTextRange();B.moveStart("character",A);B.select()}else{if(C.setSelectionRange){C.setSelectionRange(A,C.value.length)}}}function countCoord(C,B){var A=0;while(C){A+=C[B];C=C.offsetParent}return A}function getTop(A){return countCoord(A,"offsetTop")}function getLeft(A){return countCoord(A,"offsetLeft")}function getWidth(B,A){if(null!=B){ca=2.5;if(navigator&&navigator.userAgent.toLowerCase().indexOf("msie")==-1){return B.offsetWidth-ca*2}else{return B.offsetWidth}}else{return A}}function trim(C){var A=C.length;var D=0,B=A-1;while(C.charAt(D)==" "&&D<A){D++}while(C.charAt(B)==" "&&D<B){B--}return C.substring(D,B+1)}function fnShowProps(D){var C="obj";var A="";for(var B in D){A+=C+"."+B+" = "+D[B]+"\n"}alert(A)}function clearContainer(){inc=0;completeDiv.innerHTML=""}function addToContainer(A){completeDiv.innerHTML+='<span class="span'+inc%2+'">'+A+"</span><br/>";inc++}function switchContainer(A){completeDiv.style.display=(A?"block":"none")}function keyPressed(B){var A;makeAutoComplete=true;if(!B&&window.event){B=window.event}if(B){A=B.keyCode;window.status=A;if(8==A||46==A){makeAutoComplete=false}}}var textInputID="keyword";var doAutoComplete=false;var resultPattern='<a href="#" onclick="putWord(\'%index%\'); return false;">- %index%</a>';var ddajaxtabssettings={};ddajaxtabssettings.bustcachevar=1;ddajaxtabssettings.loadstatustext="<img src='http://www.toursegipto.com/Templates/js/ajaxtabs/loading.gif'> Requesting content...";function ddajaxtabs(B,A){this.tabinterfaceid=B;this.tabs=document.getElementById(B).getElementsByTagName("a");this.enabletabpersistence=true;this.hottabspositions=[];this.currentTabIndex=0;this.contentdivid=A;this.defaultHTML="";this.defaultIframe='<iframe src="about:blank" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" class="tabcontentiframe" style="width:100%; height:auto; min-height: 100px"></iframe>';this.defaultIframe=this.defaultIframe.replace(/<iframe/i,'<iframe name="_ddajaxtabsiframe-'+A+'" ');this.revcontentids=[];this.selectedClassTarget="link"}ddajaxtabs.connect=function(A,B){var F=false;var E="";if(window.XMLHttpRequest){F=new XMLHttpRequest()}else{if(window.ActiveXObject){try{F=new ActiveXObject("Msxml2.XMLHTTP")}catch(C){try{F=new ActiveXObject("Microsoft.XMLHTTP")}catch(C){}}}else{return false}}var D=A.replace(/^http:\/\/[^\/]+\//i,"http://"+window.location.hostname+"/");F.onreadystatechange=function(){ddajaxtabs.loadpage(F,A,B)};if(ddajaxtabssettings.bustcachevar){E=(D.indexOf("?")!=-1)?"&"+new Date().getTime():"?"+new Date().getTime()}F.open("GET",D+E,true);F.send(null)};ddajaxtabs.loadpage=function(D,A,C){var B=C.contentdivid;document.getElementById(B).innerHTML=ddajaxtabssettings.loadstatustext;if(D.readyState==4&&(D.status==200||window.location.href.indexOf("http")==-1)){document.getElementById(B).innerHTML=D.responseText;ddajaxtabs.ajaxpageloadaction(A,C)}};ddajaxtabs.ajaxpageloadaction=function(A,B){B.onajaxpageload(A)};ddajaxtabs.getCookie=function(A){var B=new RegExp(A+"=[^;]+","i");if(document.cookie.match(B)){return document.cookie.match(B)[0].split("=")[1]}return""};ddajaxtabs.setCookie=function(A,B){/*document.cookie=A+"="+B+";path=/"*/};ddajaxtabs.prototype={expandit:function(A){this.cancelautorun();var B="";try{if(typeof A=="string"&&document.getElementById(A).getAttribute("rel")){B=document.getElementById(A)}else{if(parseInt(A)!=NaN&&this.tabs[A].getAttribute("rel")){B=this.tabs[A]}}}catch(C){alert("Invalid Tab ID or position entered!")}if(B!=""){this.expandtab(B)}},cycleit:function(B,A){if(B=="next"){var C=(this.currentTabIndex<this.hottabspositions.length-1)?this.currentTabIndex+1:0}else{if(B=="prev"){var C=(this.currentTabIndex>0)?this.currentTabIndex-1:this.hottabspositions.length-1}}if(typeof A=="undefined"){this.cancelautorun()}this.expandtab(this.tabs[this.hottabspositions[C]])},setpersist:function(A){this.enabletabpersistence=A},loadajaxpage:function(A){ddajaxtabs.connect(A,this)},loadiframepage:function(A){this.iframedisplay(A,this.contentdivid)},setselectedClassTarget:function(A){this.selectedClassTarget=A||"link"},getselectedClassTarget:function(A){return(this.selectedClassTarget==("linkparent".toLowerCase()))?A.parentNode:A},onajaxpageload:function(A){},expandtab:function(B){var D=B.getAttribute("rel");var C=(B.getAttribute("rev"))?","+B.getAttribute("rev").replace(/\s+/,"")+",":"";if(D=="#default"){document.getElementById(this.contentdivid).innerHTML=this.defaultHTML}else{if(D=="#iframe"){this.iframedisplay(B.getAttribute("href"),this.contentdivid)}else{ddajaxtabs.connect(B.getAttribute("href"),this)}}this.expandrevcontent(C);for(var A=0;A<this.tabs.length;A++){this.getselectedClassTarget(this.tabs[A]).className=(this.tabs[A].getAttribute("href")==B.getAttribute("href"))?"selected":""}if(this.enabletabpersistence){ddajaxtabs.setCookie(this.tabinterfaceid,B.tabposition)}this.setcurrenttabindex(B.tabposition)},iframedisplay:function(B,A){if(typeof window.frames["_ddajaxtabsiframe-"+A]!="undefined"){try{delete window.frames["_ddajaxtabsiframe-"+A]}catch(C){}}document.getElementById(A).innerHTML=this.defaultIframe;window.frames["_ddajaxtabsiframe-"+A].location.replace(B)},expandrevcontent:function(C){var A=this.revcontentids;for(var B=0;B<A.length;B++){document.getElementById(A[B]).style.display=(C.indexOf(","+A[B]+",")!=-1)?"block":"none"}},setcurrenttabindex:function(A){for(var B=0;B<this.hottabspositions.length;B++){if(A==this.hottabspositions[B]){this.currentTabIndex=B;break}}},autorun:function(){this.cycleit("next",true)},cancelautorun:function(){if(typeof this.autoruntimer!="undefined"){clearInterval(this.autoruntimer)}},init:function(A){var E=ddajaxtabs.getCookie(this.tabinterfaceid);var D=true;this.automodeperiod=A||0;this.defaultHTML=document.getElementById(this.contentdivid).innerHTML;for(var C=0;C<this.tabs.length;C++){this.tabs[C].tabposition=C;if(this.tabs[C].getAttribute("rel")){var B=this;this.hottabspositions[this.hottabspositions.length]=C;this.tabs[C].onclick=function(){B.expandtab(this);B.cancelautorun();return false};if(this.tabs[C].getAttribute("rev")){this.revcontentids=this.revcontentids.concat(this.tabs[C].getAttribute("rev").split(/\s*,\s*/))}if(this.enabletabpersistence&&parseInt(E)==C||!this.enabletabpersistence&&this.getselectedClassTarget(this.tabs[C]).className=="selected"){this.expandtab(this.tabs[C]);D=false}}}if(D){this.expandtab(this.tabs[this.hottabspositions[0]])}if(parseInt(this.automodeperiod)>500&&this.hottabspositions.length>1){this.autoruntimer=setInterval(function(){B.autorun()},this.automodeperiod)}}};function putWord(A){document.getElementById("keyword").value=A;document.getElementById("completeDiv").style.display="none"}document.onclick=function(A){if(document.getElementById("completeDiv")){document.getElementById("completeDiv").style.display="none"}};
