// JavaScript Document
<!--
/*
 * global.js
 *
 * Ogólne strypty JS.
 *
 * Copyright (c) 2007 by Varts.PL
 *
 */
function show(id,type){
	ds = type != '' ? 'block' : type
	ob = document.getElementById(id);
	if (ob.style.display == 'none') {
		ob.style.display = ds;
		return false;
	}else if(ob.style.display == ds){
		ob.style.display = 'none';
		return false;
	}
	ob.style.display = ds;
	return false;
}
function otworz(winName,URL){
		window.open(URL,winName,'toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=700,height=500')
}

function otworz_size(winName,URL,szer,wys){
		window.open(URL,winName,'toolbar=false,location=false,directories=false,status=false,menubar=false,scrollbars=false,resizable=false,width='+szer+',height='+wys)
}

function OpenWindowImg (WindowName, Resize, URL, DEBUG)
{
	var x = 0, y = 0, szer = 100, wys = 100, s_w = screen.availWidth, s_h = screen.availHeight;

	if (s_w > 0 && s_h > 0)
	{
		if (s_w <= szer) szer=s_w;
		else
		{
			x = (s_w / 2) - (szer / 2);
			if (x < 0) x = 0;
		}

		if (s_h <= wys) wys = s_h;
		else
		{
			y = (s_h / 2) - (wys / 2);
			if (y < 0) y = 0;
		}
	}

	if (DEBUG) StatusBar = 'yes';
	else       StatusBar = 'no';

	NewWindow = window.open ('' + URL, WindowName, 'toolbar=no,location=no,directories=no,status=' + StatusBar + ',menubar=no,scrollbars='+ Resize +',resizable='+ Resize +',width='+ szer +',height='+ wys +',left='+ x +',top='+ y);
}

function OpenWindowImg2 (WindowName, URL)
{
	var x = 0, y = 0, szer = 750, wys = 1200, s_w = screen.availWidth, s_h = screen.availHeight;

	if (s_w > 0 && s_h > 0)
	{
		if (s_w <= szer) szer=s_w;
		else
		{
			x = (s_w / 2) - (szer / 2);
			if (x < 0) x = 0;
		}

		if (s_h <= wys) wys = s_h;
		else
		{
			y = (s_h / 2) - (wys / 2);
			if (y < 0) y = 0;
		}
	}

	NewWindow = window.open (URL, WindowName, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+ szer +',height='+ wys +',left='+ x +',top='+ y);
}

function OpenFullWindow (WindowName, URL)
{
	NewWindow = window.open (URL, 'NewWindow', 'toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+ screen.availWidth +',height='+ screen.availHeight +',left=0,top=0');
}


function DoCmd (URL)
{
	self.location.href = URL;
}


function DoCmdWithConfirm (URL, MSG)
{
	if (!confirm (MSG))
		return;
	else
		DoCmd (URL);
}


function DoInParentWin (URL)
{
	self.opener.location.href = '/' + URL;
}

function setNewVal( objSrcName,objDestName )
{

	var boxSrc =  document.getElementById(objSrcName);
	var boxDest =  document.getElementById(objDestName);

	var valueSrc = boxSrc.options[boxSrc.selectedIndex].value;
	boxDest.selectedIndex = boxSrc.selectedIndex;

}
function dodaj() {
  if (navigator.appName=="Netscape") {
    window.sidebar.addPanel("Igor Orliński",'http://www.orlinski.info/',"_self");
	return false
  } else if (navigator.userAgent.indexOf("Opera")>-1) {
    window.sidebar.addPanel("Igor Orliński",'http://www.orlinski.info/',null);
	return false
  } else if (navigator.appName=="Microsoft Internet Explorer") {
    document.body.style.behavior = "url(#default#homepage)";
    document.body.setHomePage("www.orlinski.info");
  }
}

//-->

