/*<!--*/

/*
 AHOJ 
*/
/* 
	class:		Page
	file:		wapi.js
	project: 	wapi
	date:		22.09.2001
	version:	0.1
	note:		
	
	-----------------------------------------------------

	copyright (c) 2001 robert walaski [robert@walaski.cz]

USING:

1. include this library as your first Javasript in your HTML page:
	<SCRIPT SRC="wapi.js" TYPE="text/javascript"></SCRIPT>


INTERFACE:

Variables:

Functions:

	A_Href_StatusBar(txt)
		- shows text in status bar
	A_Href_Over(txt,iname,ipath)
	A_Href_Out(iname,ipath)
		- changes images while mouse is going over or out from specified id object
	Question(text)
		- shows question and return true or false
	ClearValue(id,text)
		- clears value in object specified by id (almoust used in forms)
	RefreshValue( id, text)
		- refresh in form object default value, if none was typed
	BackgroundColor(id,color)
		- changes background color of id object
	

-----------------

HISTORY:

0.1 - The first. 

-----------------

LICENSE:
Commercial for any use (ask for a license)
No support at all.

-----------------
*/


/*
============================================================
Script:    Basic No-Right-Click Script
Functions: Blocks right-click on mouse and shows alert box
Browsers:  NS & IE 4.0 & later; degrades gracefully
Author:    etLux
============================================================

Put the following script in the head of your page:
*/

/*

 (C) 2000 www.CodeLifter.com
	http:www.codelifter.com
 Free for all users, but leave in this  header

 Set the message for the alert box
am = "This function is disabled!";

 do not edit below this line
 ===========================
bV  = parseInt(navigator.appVersion)
bNS = navigator.appName=="Netscape"
bIE = navigator.appName=="Microsoft Internet Explorer"

function nrc(e) {
   if (bNS && e.which > 1){
      alert(am)
      return false
   } else if (bIE && (event.button >1)) {
     alert(am)
     return false;
   }
}

document.onmousedown = nrc;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (bNS && bV<5) window.onmousedown = nrc;
*/


/***[ A_Href_StatusBar ]****************************************************/

function A_Href_StatusBar(txt)
{ 
  window.status = txt;
}

  
/***[ A_Href_Over ]*********************************************************/

function A_Href_Over(txt,iname,ipath)
{
  if( iname!='')
    document.images[iname].src = ipath+iname+'_over.gif';   
  window.status = txt;
}

/***[ A_Href_Out ]**********************************************************/

function A_Href_Out(iname,ipath) { 
  if( iname!='')
    document.images[iname].src = ipath+iname+'.gif';   
  window.status = ''; 
}  


/***[ Question ]************************************************************/

function Question(text) { 
    if(!confirm(text))
    {
      return false;
    }
	return true;
}  

/***[ ClearValue ]**********************************************************/

function ClearValue(id,text) {
	if (id.value==text) 
	{
		id.value='';
	}
}


/***[ BackgroundColor ]*****************************************************/

function BackgroundColor(id,color) {
	id.style.backgroundColor = color;
}


/***[ RefreshValue ]********************************************************/

function RefreshValue( id, text) {
	if (id.value=='') 
	{ 
		id.value=text;
	}
}

/***[ PrintPage ]***********************************************************/
function PrintPage() {
   if(document.all || document.layers)
      { window.print(); }
   else { 
	    text = 'Pokud chcete vytisknout stránku, tak  použijte volbu svého prohlížeče:\n\nTISK (PRINT). tlačítkem \nZPĚT (BACK) se dostanete znovu do celého článku.'
   		window.alert( text); 
	}
}


/***[ ShowImage ]***********************************************************/
function ShowImage(URL, x, y) {
	myurl = "URL"+Math.floor(Math.random()*10000);
	aWindow = 
window.open(URL, myurl, "width="+x+",height="+y+",toolbar=0,directories=0,menubar=0,status=no,resizable=0,location=no,scrollbars=0,copyhistory=0");
	aWindow.focus();
	}

	
	
/***[ class Cookie ]********************************************************/
var wapi_Cookie = {
    Write:function(name,value,days) {
        var D = new Date();
        D.setTime(D.getTime()+86400000*days)
        document.cookie = escape(name)+"="+escape(value)+
            ((days == null)?"":(";expires="+D.toGMTString())) + ";path=/"
        return (this.Read(name) == value);
    },
    Read:function(name) {
        var EN=escape(name);
        var F=' '+document.cookie+';', S=F.indexOf(' '+EN);
        return S==-1 ? null : unescape(     F.substring(EN=S+EN.length+2,F.indexOf(';',EN))    );
    }
} 



/* //-->*/


