var smooth_timer;var old_opacity;function ExplorerFix(){for(a in document.links)document.links[a].onfocus=document.links[a].blur;}
if(document.all){document.onmousedown=ExplorerFix;}
function getStyle(elementId){var temp=(document.getElementById ? document.getElementById(elementId):eval("document.all['"+elementId+"']")).style;return temp;}
function switchVote(){var scroll=getPageScroll();element=document.getElementById ? document.getElementById('vote-box'):eval("document.all['vote-box']");element.style.top=scroll[1]+100+"px";Fog('vote',0.6)
if(element.style.display!='none'){new Effect.Fade('vote-box');}else{new Effect.Grow('vote-box');}
return false;}
function Fog(id,opacity){element=document.getElementById ? document.getElementById(id):eval("document.all['"+id+"']");if(element.style.display!='none'){new Effect.Fade(id,{duration:1.0});}else{size=PageSize();element.style.height=size[1]+'px';element.style.width=size[0]+'px';new Effect.Appear(id,{duration:1.0,from:0.0,to:opacity});}
return false;}
function SwitchDisplay(id,mode){element=document.getElementById ? document.getElementById(id):eval("document.all['"+id+"']");var mode=mode.trim()=='' ? 'block':mode;if(element.style.display!='none'){element.style.display='none';}
else{element.style.display=mode;}
return element.style.display;}
function PageSize(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=window.innerWidth+window.scrollMaxX;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight > document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
var windowWidth,windowHeight;if(self.innerHeight){if(document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth;}else{windowWidth=self.innerWidth;}
windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
if(yScroll < windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
if(xScroll < windowWidth){pageWidth=xScroll;}else{pageWidth=windowWidth;}
arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight)
return arrayPageSize;}
function getPageScroll(){var xScroll,yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;xScroll=self.pageXOffset;}else if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;xScroll=document.documentElement.scrollLeft;}else if(document.body){yScroll=document.body.scrollTop;xScroll=document.body.scrollLeft;}
arrayPageScroll=new Array(xScroll,yScroll)
return arrayPageScroll;}
function show_hide(divid){current=(document.getElementById ? document.getElementById(divid):eval("document.all['"+divid+"']"));new Effect.toggle(divid,'blind');if(current.style.display!='none'){return false;}
else{return true;}
}
function changeImg(img_src,img_desc,img_id,link_id){if(img_src.trim()==''){return false;}
img_obj='';link_obj='';img_obj=(document.getElementById ? document.getElementById(img_id):eval("document.all['"+img_id+"']"));link_obj=(document.getElementById ? document.getElementById(link_id):eval("document.all['"+link_id+"']"));img_obj.src='http://www.hotelterra-varna.com/data/images/terra/bild/loading.gif';img_obj.alt=img_desc;img_obj.style.height='32px';img_obj.style.width='32px';img_obj.style.margin='50px 0 0';img_obj.style.border='0px none';link_obj.style.background='#F1E3B9';link_obj.href=img_src;link_obj.title=img_desc;newImage=new Image();newImage.src=img_src;newImage.onload=(function(){img_obj.style.display='none';img_obj.style.height=img_obj.style.width=img_obj.style.margin=img_obj.style.border=link_obj.style.background='';img_obj.src=newImage.src;new Effect.Appear(img_obj,{duration:0.4,
queue:'end'
});});return false;}
String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"");}
String.prototype.ltrim=function(){return this.replace(/^\s+/,"");}
String.prototype.rtrim=function(){return this.replace(/\s+$/,"");}
function imageHigh(elem){new Effect.Opacity(elem,{duration:0.3,from:0.7,to:1.0});}
function imageLow(elem){new Effect.Opacity(elem,{duration:0.3,from:1.0,to:0.7});}
