/* 

javascript

cyberpodroze/tourist_scripts.js

 */

xMousePos=-10000;yMousePos=-10000;if(document.layers){document.captureEvents(Event.MOUSEMOVE);document.onmousemove=captureMousePosition;document.onload=captureMousePosition;}else if(document.all){document.onmousemove=captureMousePosition;document.onload=captureMousePosition;}else if(document.getElementById){document.onmousemove=captureMousePosition;document.onload=captureMousePosition;}
function captureMousePosition(e){if(document.layers){xMousePos=e.pageX;yMousePos=e.pageY;}else if(document.all){if(document&&document.body){if(document.documentElement)
{theTop=document.documentElement.scrollTop;}
else if(document.body)
{theTop=document.body.scrollTop;}
xMousePos=event.clientX+document.body.scrollLeft;yMousePos=event.clientY+theTop;}}else if(document.getElementById){xMousePos=e.pageX;yMousePos=e.pageY;}}
function handle(delta){if(delta<0);else;}
function set_pos_cyber_hint(div,left,top,width){var page_width=document.getElementById('all').offsetLeft+document.getElementById('all').offsetWidth;width=width+20;if(page_width<xMousePos+left+width){left=left-width;}
document.getElementById(div).style.left=xMousePos+left+'px';document.getElementById(div).style.top=yMousePos+top+'px';}
function show_cyber_hint(a,width){var hint=a.getAttribute('title_hint');document.getElementById('cyber_hint').style.width='auto';document.getElementById('cyber_hint_window').style.width='auto';document.getElementById('cyber_hint').innerHTML=hint;document.getElementById('cyber_hint_window').style.display='inline';if(width){width=document.getElementById('cyber_hint').offsetWidth;document.getElementById('cyber_hint_window').style.width=width+'px';var width2=width-12;document.getElementById('up').style.width=width2+'px';document.getElementById('cyber_hint').style.width=width2+'px';document.getElementById('down').style.width=width2+'px';}else{width=document.getElementById('cyber_hint').offsetWidth;document.getElementById('cyber_hint_window').style.width=width+'px';var width2=width-12;document.getElementById('up').style.width=width2+'px';document.getElementById('cyber_hint').style.width=width2+'px';document.getElementById('down').style.width=width2+'px';}
set_pos_cyber_hint('cyber_hint_window',10,0,width);show_iframe('cyber_hint_window');}
function hide_cyber_hint(){document.getElementById('cyber_hint_window').style.display='none';hide_iframe('cyber_hint_window');}
function show_iframe(div){obj=document.getElementById(div);var left=obj.offsetLeft;var top=obj.offsetTop;var width=obj.offsetWidth;var height=obj.offsetHeight;left=left-3;width=width+3;if(document.getElementById("iframe_"+div+"_content")){document.getElementById("iframe_"+div+"_content").style.left=left;document.getElementById("iframe_"+div+"_content").style.top=top;document.getElementById("iframe_"+div+"_content").style.width=width;document.getElementById("iframe_"+div+"_content").style.height=height;}else{var iFrame='<iframe id="iframe_'+div+'_content" style="position:absolute; filter:alpha(opacity=0); left:'+left+'px; top:'+top+'px; width:'+width+'px; height:'+height+'px; z-index:100;" src="" frameBorder="0" scrolling="no"></iframe>';document.getElementById("iframe_"+div).innerHTML=iFrame;}
document.getElementById("iframe_"+div).style.display='inline';}
function hide_iframe(div){if(!document.getElementById("iframe_"+div+"_content")){document.getElementById("iframe_"+div).innerHTML='';}
document.getElementById("iframe_"+div).style.display='none';}