// (c)nuxx 4 spiderweb ... nuxx@seznam.cz

var load,bswitch,bflip;

{
b_a0 = new Image(); b_a0.src="../img/em0.jpg";
b_b0 = new Image(); b_b0.src="../img/em1.jpg";
}


var locked=100; var lastvisible=0;

// ******** lock:

function switchto(x)
{
 if (bswitch!="no"){
    if (locked!=100){
      eval("document.btn"+locked+".src=b_a"+locked+".src");   // unlock last locked button btn1.src=b_a1.src 
    }
    locked=x;                                            // set new lock flag
    eval("document.btn"+x+".src=b_b"+x+".src");        // btn1.src=b_b1.src 
  lastvisible=x;
 }
}



// ******** 
function flip(imgid,imgobj)
{
 if(bflip!="no"){
   if (imgid!=locked) eval("document.btn"+imgid+".src=b_"+imgobj+".src");
                               // btn1.src=b1.src
 }
}


function openwin(str)
{
var w=340, h=230;
var win=0;

var ua = window.navigator.userAgent
var msie = ua.indexOf ( "MSIE " )
if ( msie > 0 )        // is Microsoft Internet Explorer; return version number
if ( parseInt ( ua.substring ( msie+5, ua.indexOf ( ".", msie ) ) ) >5 )
  {
	win=window.open("about:blank",null,"height="+h+",width="+w+",status=no,toolbar=no,menubar=no,location=no");
	//win.moveTo(275,186);
	win.document.write("<html><head><title>Ukázka</title></head> \n");
	win.document.write("<LINK href=\"nuxx2.css\" rel=StyleSheet type=text/css> \n");
	win.document.write("<body bgcolor=#ffffff ><center>");
	win.document.write("<img name=i id=i src=\""+str+"\" onclick=\"window.close();\" onload=\"window.resizeTo(i.width+10,i.height+30);\"> \n");
	win.document.write("</center></body></html>");
	win.location.reload();
	win.focus();
  }
else
                                  //other browser
{
  var im=new Image();
  eval("im.src="+str);
  w=im.width;
  h=im.height;
  eval (" window.open(str,null,\"height=\"+h+\",width=\"+w+\",status=no,toolbar=no,menubar=no,location=no\") ");
}


}
