function Enter(evt) { var evt = (evt) ? evt : ((event) ? event : null); var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null); if (evt.keyCode == 13 && node.id=='NavSrc') {getElm('SearchButton').click();} } document.onkeypress = Enter; var dv; var target=new Array(); function initHotel() { tmp = document.getElementById('HotelSlider'); if(tmp == undefined) {} else { dv = document.getElementById('HotelSlider').childNodes[0].childNodes[0]; //addtarget(-400,0,50,5); //addtarget(0,0,50,5); addtarget(-500,-40,40,5); addtarget(-520,-80,40,5); addtarget(-1000,-80,40,5); addtarget(-800,-500,40,5); addtarget(-400,-550,40,5); addtarget(-220,-530,40,5); addtarget(-220,-230,40,5); addtarget(-120,-230,40,5); addtarget(-30,-30,40,5); //addtarget(-250,-450,40,5); //addtarget(-1000,-650,40,6); //addtarget(-1100,-450,40,4); //addtarget(-1500,-90,40,4); //addtarget(-2000,-120,40,4); //addtarget(-1900,-110,60,2); //addtarget(-1,-1,40,5); movingloop(); } } function ResetTabs(active) { OFF('GalleryData'); OFF('NewImage'); OFF('ImageList'); OFF('EditImage'); OFF('NewImages'); OFF('ExistingImages'); document.getElementById('ExistingImages').style.color='white'; document.getElementById('NewImagesTab').style.color='white'; document.getElementById('GalleryDataTab').style.color='white'; document.getElementById('NewImageTab').style.color='white'; document.getElementById('ImageListTab').style.color='white'; document.getElementById('EditImageTab').style.color='white'; document.getElementById('ExistingImagesTab').style.color='white'; ON(active); document.getElementById(active+'Tab').style.color='yellow'; } function oeffnen(url, width, height) { window.open(url,'NoNeed','width=' + width + ',height=' + height + ',resizable=0,scrollbars=yes,menubar=no,status=no,left=50,top=50'); } function openLink(URI){ win = window.open(URI,"secWin","width=800,height=600,left=100,scrollbars=yes,resizable=yes,location=yes"); win.focus; } function EMailc(s){var a = false;var res = false;if(typeof(RegExp) == 'function'){var b = new RegExp('abc');if(b.test('abc') == true){a = true;}} if(a == true){reg = new RegExp('^([a-zA-Z0-9\-\.\_]+)'+'(\@)([a-zA-Z0-9\-\.]+)'+'(\.)([a-zA-Z]{2,4})$');res = (reg.test(s));}else{res = (s.search('@') >= 1 && s.lastIndexOf('.') > s.search('@') && s.lastIndexOf('.') >= s.length-5)} return(res);} function ON(Elem){document.getElementById(Elem).style.display='';} function OFF(Elem){document.getElementById(Elem).style.display='none';} function getElm(eID) {return document.getElementById(eID);} function form_input_is_numeric(input){return !isNaN(input);} function Switch(Elem) {if(document.getElementById(Elem).style.display=='none'){document.getElementById(Elem).style.display='';}else{document.getElementById(Elem).style.display='none';}} function setOpacity(eID, opacityLevel) { var eStyle = document.getElementById(eID).style; eStyle.opacity = opacityLevel / 100; eStyle.filter = 'alpha(opacity='+opacityLevel+')'; } function show(eID) { getElm(eID).style.display='block'; } function hide(eID) { getElm(eID).style.display='none'; } function fadeIn(eID) { if(getElm(eID).style.opacity!=1) { setOpacity(eID, 0); show(eID); var timer = 0; for (var i=1; i<=100; i++) { setTimeout("setOpacity('"+eID+"',"+i+")", timer * 5); timer++; } } } function fadeOut(eID) { if(getElm(eID).style.opacity==1) { var timer = 0; for (var i=100; i>=1; i--) { setTimeout("setOpacity('"+eID+"',"+i+")", timer * 3); timer++; } setTimeout("hide('"+eID+"')", 310); } } function CheckMoreBar(Height) { if(Height>1300) { // alert(GSAdd); // document.body.innerHTML+="
" + GSAdd; } } function DoSearch(){location.href='Search.php?V=' + getElm('RootSearch').value} function createRequestObject() { try {var myRequest = new XMLHttpRequest();} catch(error) { try {var myRequest = new ActiveXObject("MSXML2.XMLHTTP");} catch(error) {var myRequest = new ActiveXObject("Microsoft.XMLHTTP");} } return myRequest; } function ChckW() { var x = 0; if (self.innerHeight) {x = self.innerWidth;} else if (document.documentElement && document.documentElement.clientHeight) {x = document.documentElement.clientWidth;} else if (document.body) {x = document.body.clientWidth;} URL="/_lib/FetchWidth.php?" + x; if(x != 0 || x==0) { Cls=createRequestObject(); Cls.open("GET", URL, true); Cls.send(null); } } function addtarget(x,y,speed,frames) { str=x + ',' + y + ','+ speed +','+ frames; target.push(str); } function appendpos(x,y) { var cx = (dv.style.left.replace("px","")*1); var cy = (dv.style.top.replace("px","")*1); if(x!=0) dv.style.left=(cx+x) + 'px'; if(y!=0) dv.style.top=(cy+y) + 'px'; } function movingloop() { ii=0 c_x=dv.offsetLeft; c_y=dv.offsetTop; for (var i = 0; i < target.length; i++) { t_x = 0; t_y = 0; m_x=0; m_y=0; t = target[i].split(',') while(c_x!=t[0] || c_y!=t[1]) { ii+=1 if(c_x!=t[0]) { if(c_x0 && c_x+(m_x*1) > t[0]) m_x=1 else if (m_x<0 && c_x+(m_x*1) < t[0]) m_x=-1 c_x+=(m_x*1) } else m_x=0; if(c_y!=t[1]) { if(c_y0 && c_y+(m_y*1) > t[1]) m_y=1 else if (m_y<0 && c_y+(m_y*1) < t[1]) m_y=-1 c_y+=(m_y*1) } else m_y=0; setTimeout("appendpos(" + m_x + "," + m_y + ")",(ii*t[2])) } } ii+=1 setTimeout("movingloop()",(ii*t[2])) }