<!--
/****************************************************************************
 * (C) Robonet 2006                                                         *
 * Common useful navigation functions.                                      *
 *                                                                          *
 ***************************************************************************/

function goToUrl(sUrl){
//goto specified URL
    location.href=sUrl;   
}

function createWindow(sText) {
//create new window with content

    myWin= open("", "displayWindow6","width=640,height=480,status=1,toolbar=0,menubar=0,scrollbars=1,resizeable=yes");
    myWin.document.open();
    //myWin.document.write(\"<HTML><HEAD><meta http-equiv='content-type'CONTENT='charset=windows-1251'>\");
    //myWin.document.write(\"<TITLE></TITLE></HEAD>\");
    myWin.document.write(sText);
    myWin.document.close();
}

function createWindowSrc(sSrc, width, height, title) {
//create new window with content
var min=1000000;
var max=9999999;
var rand=min+Math.floor((max-min+1)*Math.random());
    myWin= window.open(sSrc, "win"+rand,"dependent=yes,width="+width+",height="+height+",status=1,toolbar=0,menubar=0,scrollbars=yes,resizable=1");

    var windowwidth, windowheight;
    /*
	if (window.innerWidth) {
      windowwidth = myWin.outerWidth;
      windowheight = myWin.outerHeight;
    } else {
      windowwidth = myWin.document.body.clientWidth;
      windowheight = myWin.document.body.clientHeight;
    }
	*/
	windowwidth = width;
    windowheight = height;
	  
    var screenwidth = screen.availWidth;
    var screenheight = screen.availHeight;
    
    myWin.moveTo(
      Math.round((screenwidth - windowwidth) / 2),
      Math.round((screenheight - windowheight) / 2));

    myWin.focus();
}

function showElement(sElementId){
//set visible style
    var messenger = document.getElementById(sElementId);
    if(messenger.style.visibility == "hidden"){
        messenger.style.visibility = "visible";
    }
}    

function alertSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  
  var a={'width':myWidth, 'height':myHeight }
  return a;
}


-->
