//© 1999 Alex Ramones Group. (WR) All rights reserved.

var
	browserName  = navigator.appName,
	browserVersion = parseInt(navigator.appVersion),
	nn="yes",
	ie="no",
	leftPosWindow = 0,
	topPosWindow = 0;

 if ((browserName == "Netscape" || browserName == "Sylaba"))
    {
       nn="yes";
       ie="no";
    }
 if (browserName == "Microsoft Internet Explorer")
    {
       nn="no";
       ie="yes"
    }

function createHWnd(hWnd,urlWin,nameWin,widthWin,heightWin)
{ 
   var str_ = "";     
   leftPosWindow = (screen.width/2)-(widthWin/2);
   topPosWindow = (screen.height/2)-(heightWin/2);
   str_ = "toolbar=no,resizable=no,scrollbars=no,width="+widthWin+",height="+heightWin+",left="+leftPosWindow+",top="+topPosWindow;
   hWnd=window.open(urlWin,hWnd,str_);
}

function createHWnd2(hWnd,urlWin,nameWin,widthWin,heightWin)
{
   var str_ = "";
   if(screen.width > 800){
   		leftPosWindow = (screen.width/2)-(widthWin/2);
   		topPosWindow = (screen.height/2)-(heightWin/2);
   } else leftPosWindow = (screen.width/2)-(widthWin/2);
   str_ = "toolbar=no,resizable=no,scrollbars=yes,width="+widthWin+",height="+heightWin+",left="+leftPosWindow+",top="+topPosWindow;
   hWnd=window.open(urlWin,hWnd,str_);
}

function resize_hWnd(x_,y_)
{
   
   self.resizeTo(x_,y_);
   self.moveBy(0,-100);
}

function add_hWnd(x_,y_)
{
 //  self.close();
//   location.href = "add.html" 
//   self.resizeBy(0,y_);
//   self.moveBy(0,-100);
   createHWnd2('add','http://www.jaroslaw.pl/cgi-bin/jaroslaw/book/add_form.cgi','guestBook',700,560);
	self.close();
}

function search_hWnd(x_,y_)
{
//   location.href = "search.html" 
//   self.resizeTo(x_,y_);
//   self.moveBy(0,-100);
//   self.close();
   createHWnd2('search','http://www.jaroslaw.pl/cgi-bin/jaroslaw/book/search_form.cgi','guestBook',700,560);
	self.close();
}

function view_hWnd(x_,y_)
{
//   self.close();
//   location.href = "add.html" 
//   self.resizeBy(0,y_);
//   self.moveBy(0,-100);
   createHWnd2('view','viewer.html','guestBook',700,560);
	self.close();
}

function openWindow2_()
{ 
   if (nn=="yes")
      hWnd=window.open("firstp.html","hWnd","toolbar=no,resizable=no,scrollbars=yes,width=450,height=480,left=400,top=0");
   else
      hWnd=window.open("firstp.html","hWnd","toolbar=no,resizable=no,scrollbars=no,width=450,height=480,top=0,left=0");

}

function openClock(){
	hWnd=window.open("clock/clock.html","hWnd","toolbar=no,resizable=no,scrollbars=no,width=275,height=455,top=0,left=0");
}

function openGuestBookNN()
{
   guestBook = window.open("ksiega/gsb_v10.html","guestBook","left=100,top=100,width=680,height=290,toolbar=0,location=0,directories=0,menubar=0,scrollbars=0,resizable=0,status=0");
}





