function VTX_GetObj(obj)
  {
    return ((document.getElementById) ? document.getElementById(obj) : eval("document.all[" + obj + "]"));
      }

function hideMenu(){

	var layer='langselect';
		if(layer!="") {
		if(document.layers){
            //thisbrowser="NN4";
           document[layer].visibility="hidden";
        }
        if(document.all){
            //thisbrowser="ie"
            document.all[layer].style.visibility="hidden";
        }
        if(!document.all && document.getElementById){
            //thisbrowser="NN6";
            document.getElementById(layer).style.visibility="hidden";
        }
		}

//HideVTX('langselect');
}

var timeout;

function showMenu(visible,over){


var layer='langselect';
visible = true;
window.clearTimeout(timeout);
        if(document.layers){
            //thisbrowser="NN4";
            if(visible) document[layer].visibility="visible";
			else document[layer].visibility="hidden";
        }
        if(document.all){
            //thisbrowser="ie"
            if(visible) document.all[layer].style.visibility="visible";
			else document.all[layer].style.visibility="hidden";
        }
        if(!document.all && document.getElementById){
            //thisbrowser="NN6";
            if(visible) document.getElementById(layer).style.visibility="visible";
			else document.getElementById(layer).style.visibility="hidden";
        }
		window.status=over;
		if(over==0) timeout=window.setTimeout("hideMenu()",1000);

//ShowVTX('langselect');
}

var tout;
var imageids;
var n=0;

function showDetailed(name,randomly){
	document.getElementById('detailed').src='../images/'+folder+'/'+name+'.jpg';
	if(randomly==null) {clearTimeout(tout);}
}

function changeRandomly(){
	do{
	m=Math.floor(Math.random()*(imageids.length));
	} while(m==n);
	n=m;
	showDetailed(imageids[n],1);
	tout=window.setTimeout(changeRandomly,2000);
}

function preloadImages(){
		document.write("<div style='display:none'>");
for(var i=0;i<imageids.length;i++){
		document.write("<img src='../images/"+folder+"/"+imageids[i]+".jpg'>");
	}
	document.write("</div>");
}


function popup(kep,scroll)
    {
      if (scroll==null) {scroll='no';}
      page='/images/gallery/popup.php?kepfile='+kep+'&scroll='+scroll;
      w = 1;
      h = 1;
      l = 0;
      t = 0;
      settings = 'scrollbars=' + scroll + ',resizable=no,status=no,menubar=yes,width=' + w + ',height=' + h + ',left='
                 + l + ',top=' + t + ',screenX=' + l + ',screenY=' + t;
      win = window.open(page, 'popup', settings);
      win.focus();
}


function popupleiras(page, scroll, w, h, name)
    {
    if (w == null)
        {
        w = 750;
        }

    if (h == null)
        {
        h = 500;
        }

    h = h - 20;

    if (scroll == null)
        {
        scroll = 'no';
        }

    if (name == null)
        {
        name = 'popupleiras';
        }

    l = (window.screen.width - (w + 10))/2;
    t = (window.screen.height - (h + 55 + 62))/2;
    settings = 'scrollbars=no,resizable=yes,status=no,menubar=no,width=' + w + ',height=' + h + ',left='
                 + l + ',top=' + t + ',screenX=' + l + ',screenY=' + t;
    window.win = window.open(page, 'zara_music', settings);
    window.win.focus();
    }

function EmailViewer(lang,id)
  {
  var left;
  var top;
  left = document.documentElement.clientWidth / 2;
  top = document.documentElement.clientHeight / 2;
  width=300;
  height=100;
  myRef = window.open('http://zarahotels.com/email_viewer.php?lang='+lang+'&id=' + id,'myWin',"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width="+width+",height="+height+",left="+left+",top="+top);
  myRef.focus();
  }
