function loadEmail(user, domain, text) {
	document.write('<a href=\"mailto:'+user+'@'+domain+'\" rel=\"nofollow\">');
	if (text == "")
		document.write(user+'@'+domain+'<\/a>');
	else
		document.write(text+'<\/a>');
}

function goTo(page, text) {
	document.write('<a href=\"http://'+page+'\" target=\"_blank\" rel=\"nofollow\">');
	if (text == "")
		document.write(page+'<\/a>');
	else
		document.write(text+'<\/a>');
}

// convert all characters to lowercase to simplify testing
var agt=navigator.userAgent.toLowerCase();

// *** BROWSER VERSION ***
// Note: On IE5, these return 4, so use is_ie5up to detect IE5.
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appMinorVersion);

var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie3    = (is_ie && (is_major < 4));
var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
var is_ie4up  = (is_ie && (is_major >= 4));
var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
var is_ie6sp1 = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) && (navigator.appMinorVersion.split(/;/)[0].toLowerCase()=='sp1'));
var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);

function deselect() {
	if (is_ie)
		document.selection.clear();
	else
		window.getSelection().removeAllRanges();
}

// *** TIMER ***
var date, count, sec, min, hour, day, year;

function takeYear(theDate)
{
	x = theDate.getYear();
	var y = x % 100;
	y += (y < 38) ? 2000 : 1900;
	return y;
}

function leadingZero(nr)
{
	if (nr < 10) nr = "0" + nr;
	return nr;
}

function setDate()
{
	//Date(year, month, day, hours, minutes, seconds)
	var eventdate = new Date(2008, 7, 30);
	
/*	var localTime = new Date();
	var TimezoneOffset = 1;
	var ms = localTime.getTime() + (localTime.getTimezoneOffset() * 60000) +TimezoneOffset * 3600000	     
	var now = new Date(ms);*/

	var now = new Date();

	date = leadingZero(now.getDate());
	date += "-";
	date += leadingZero(now.getMonth()+1);
	date += "-";
	date += takeYear(now);
	
	document.getElementById('date').innerHTML = date;
		
	count=Math.floor((eventdate.getTime()-now.getTime())/1000);

	sec = count%60;
	count = Math.floor(count/60);
	min = count%60;
	count = Math.floor(count/60);
	hour = count%24;
	count = Math.floor(count/24);
	
	if (count >= 365){
		day = count - 365*Math.floor(count/365);
	}
	else{
		day = count;
	}
	count = Math.floor(count/365);
	year = count;
	
	timer();
}

function timer()
{

	if (min < 10)
	{
	        dismin = "0" + min;
	}
	else
	{
	        dismin = min;
	}

	if (hour < 10)
	{
	        dishour = "0" + hour;
	}
	else
	{
	        dishour = hour;
	}

	dissec = (sec < 10) ? sec = "0" + sec : sec;
	
	document.getElementById('sec').innerHTML = dissec;
	document.getElementById('min').innerHTML = dismin;
	document.getElementById('hour').innerHTML = dishour;
	document.getElementById('day').innerHTML = day;
//	document.getElementById('year').innerHTML = year;

	var time = (((23-hour) < 10) ? '0' + (23-hour) : ((23-hour) > 23) ? '00' : (23-hour)) + ':' + (((59-min) < 10) ? '0' + (59-min) : ((59-min) > 59) ? '00' : (59-min))+ ':' + (((59-sec) < 10) ? '0' + (59-sec) : ((59-sec) > 59) ? '00' : (59-sec));
	
	document.getElementById('time').innerHTML = time;

	if (sec > 0)
	{
		sec--;
	}
	else
	{
		sec = "59";		
		if (min > 0)
		{
			min--;
		}
		else
		{
			min = "59";			
			if (hour > 0)
			{
				hour--;
			}
			else
			{
				hour = "23";
				if (day > 0)
				{
					day--;
				}
				else
				{
					day = "364";
					year--;
				}
			}
		}
	}

        window.setTimeout("timer()",1000)
}

// *** FLOAT LAYER ***
/******************************************************************* 
* 
* File    : JSFX_Browser.js © JavaScript-FX.com
* 
* Created : 2000/07/15 
* 
* Author  : Roy Whittle www.Roy.Whittle.com 
* 
* Purpose : To create a cross browser "Browser" object.
*		JSFX.Browser library will allow scripts to query parameters
*		about the current browser window.
* 
* History 
* Date         Version        Description 
* 2001-03-17	2.0		Converted for javascript-fx
***********************************************************************/  
if(!window.JSFX)
	JSFX=new Object();

if(!JSFX.Browser)
	JSFX.Browser = new Object();

if(navigator.appName.indexOf("Netscape") != -1)
{
	JSFX.Browser.getCanvasWidth	= function() {return innerWidth;}
	JSFX.Browser.getCanvasHeight	= function() {return innerHeight;}
	JSFX.Browser.getWindowWidth 	= function() {return outerWidth;}
	JSFX.Browser.getWindowHeight	= function() {return outerHeight;}
	JSFX.Browser.getScreenWidth 	= function() {return screen.width;}
	JSFX.Browser.getScreenHeight	= function() {return screen.height;}
	JSFX.Browser.getMinX		= function() {return(pageXOffset);}
	JSFX.Browser.getMinY		= function() {return(pageYOffset);}
	JSFX.Browser.getMaxX		= function() {return(pageXOffset+innerWidth);}
	JSFX.Browser.getMaxY		= function() {return(pageYOffset+innerHeight);}

}
else 	if(document.all) 	{
	JSFX.Browser.getCanvasWidth	= function() {return document.body.clientWidth;}
	JSFX.Browser.getCanvasHeight	= function() {return document.body.clientHeight;}
	JSFX.Browser.getWindowWidth 	= function() {return document.body.clientWidth;}
	JSFX.Browser.getWindowHeight	= function() {return document.body.clientHeight;}
	JSFX.Browser.getScreenWidth	= function() {return screen.width;}
	JSFX.Browser.getScreenHeight	= function() {return screen.height;}
	JSFX.Browser.getMinX		= function() {return(document.body.scrollLeft);}
	JSFX.Browser.getMinY		= function() {return(document.body.scrollTop);}
	JSFX.Browser.getMaxX		= function() {
		return(document.body.scrollLeft
			+document.body.clientWidth);
	}
	JSFX.Browser.getMaxY		= function() {
			return(document.body.scrollTop
				+document.body.clientHeight);
	}
} 
/*** End  ***/

/******************************************************************* 
* File    : JSFX_Layer.js  © JavaScript-FX.com
* Created : 2001/04/11 
* Author  : Roy Whittle  (Roy@Whittle.com) www.Roy.Whittle.com 
* Purpose : To create a cross browser dynamic layers.
* History 
* Date         Version        Description 
* 2001-03-17	3.0		Completely re-witten for use by javascript-fx
***********************************************************************/ 
if(!window.JSFX)
	JSFX=new Object();

JSFX.layerNo=0; 
/**********************************************************************************/
JSFX.createElem = function(htmlStr, x, y)
{
	var elem = null;

 	if(document.layers) 
	{
		elem=new Layer(2000); 
		elem.document.open(); 
		elem.document.write(htmlStr); 
		elem.document.close(); 
		elem.moveTo(x,y);
		elem.innerHTML = htmlStr;
	}
	else 
	if(document.all) 
	{
		var xName = "xLayer" + JSFX.layerNo++; 
		var txt = "<DIV ID='" + xName 
			+ "' STYLE=\"position:absolute;" 
			+ "left:"  + x + ";" 
			+ "top:"   + y + ";" 
			+ "visibility:hidden\">" 
			+ htmlStr 
			+ "</DIV>"; 

			document.body.insertAdjacentHTML("BeforeEnd",txt); 

		elem = document.all[xName]; 
	} 
	else 
	if (document.getElementById)
	{
		var xName="xLayer" + JSFX.layerNo++;
		var txt = ""
			+ "position:absolute;"
			+ "left:"  + x + "px;"
			+ "top:"   + y + "px;"
			+ "visibility:hidden";

		var newRange = document.createRange();

		elem = document.createElement("DIV");
		elem.setAttribute("style",txt);
		elem.setAttribute("id", xName);

		document.body.appendChild(elem);

		newRange.setStartBefore(elem);
		strFrag = newRange.createContextualFragment(htmlStr);	
		elem.appendChild(strFrag);
	}

	return elem;
}
/**********************************************************************************/
JSFX.Layer = function(newLayer, x, y) 
{
	if(!newLayer)
		return;

	if(x==null)x=0; 
	if(y==null)y=0; 

	if(typeof newLayer == "string")
		this.elem = JSFX.createElem(newLayer, x, y);
	else
		this.elem=newLayer;

	if(document.layers)
	{
		this.images=this.elem.document.images; 
		this.style = this.elem;
 	} 
	else 
	{
		this.images  = document.images; 
		this.style   = this.elem.style; 
	} 
} 
/**********************************************************************************/
JSFX.findLayer = function(theDiv, d)
{
	if(document.layers)
	{
		var i;
		if(d==null) d = document;
		var theLayer = d.layers[theDiv];
		if(theLayer != null)
			return(theLayer);
		else
			for(i=0 ; i<d.layers.length ; i++)
			{
				theLayer = JSFX.findLayer(theDiv, d.layers[i].document);
				if(theLayer != null)
					return(theLayer);
			}
		return("Undefined....");
	}
	else 
	if(document.all)
		return(document.all[theDiv]);
	else 
	if(document.getElementById)
		return(document.getElementById(theDiv));
	else
		return("Undefined.....");
}
var ns4 = (navigator.appName.indexOf("Netscape") != -1 && !document.getElementById);

/**********************************************************************************/
/*** moveTo (x,y) ***/
JSFX.Layer.prototype.moveTo = function(x,y)
{
	this.style.left = x+"px";
	this.style.top = y+"px";
}
if(ns4)
	JSFX.Layer.prototype.moveTo = function(x,y) { this.elem.moveTo(x,y); }
/**********************************************************************************/
/*** show()/hide() Visibility ***/
JSFX.Layer.prototype.show		= function() 	{ this.style.visibility = "visible"; } 
JSFX.Layer.prototype.hide		= function() 	{ this.style.visibility = "hidden"; } 
JSFX.Layer.prototype.isVisible	= function()	{ return this.style.visibility == "visible"; } 
if(ns4)
{
	JSFX.Layer.prototype.show		= function() 	{ this.style.visibility = "show"; }
	JSFX.Layer.prototype.hide 		= function() 	{ this.style.visibility = "hide"; }
	JSFX.Layer.prototype.isVisible 	= function() 	{ return this.style.visibility == "show"; }
}
/**********************************************************************************/
/*** zIndex ***/
JSFX.Layer.prototype.setzIndex	= function(z)	{ this.style.zIndex = z; } 
JSFX.Layer.prototype.getzIndex	= function()	{ return this.style.zIndex; }
/**********************************************************************************/
/*** BackGround Color ***/
JSFX.Layer.prototype.setBgColor	= function(color) { this.style.backgroundColor = color==null?'transparent':color; } 
if(ns4)
	JSFX.Layer.prototype.setBgColor 	= function(color) { this.elem.bgColor = color; }
/**********************************************************************************/
/*** BackGround Image ***/
JSFX.Layer.prototype.setBgImage	= function(image) { this.style.backgroundImage = "url("+image+")"; }
if(ns4)
	JSFX.Layer.prototype.setBgImage 	= function(image) { this.style.background.src = image; }
/**********************************************************************************/
/*** set Content***/
JSFX.Layer.prototype.setContent   = function(xHtml)	{ this.elem.innerHTML=xHtml; } 
if(ns4)
	JSFX.Layer.prototype.setContent   = function(xHtml)
	{
		this.elem.document.open();
		this.elem.document.write(xHtml);
		this.elem.document.close();
	}

/**********************************************************************************/
/*** Clipping ***/
JSFX.Layer.prototype.clip = function(x1,y1, x2,y2){ this.style.clip="rect("+y1+" "+x2+" "+y2+" "+x1+")"; }
if(ns4)
	JSFX.Layer.prototype.clip = function(x1,y1, x2,y2)
	{
		this.style.clip.top	=y1;
		this.style.clip.left	=x1;
		this.style.clip.bottom	=y2;
		this.style.clip.right	=x2;
	}
/**********************************************************************************/
/*** Resize ***/
JSFX.Layer.prototype.resizeTo = function(w,h)
{ 
	this.style.width	=w + "px";
	this.style.height	=h + "px";
}
if(ns4)
	JSFX.Layer.prototype.resizeTo = function(w,h)
	{
		this.style.clip.width	=w;
		this.style.clip.height	=h;
	}
/**********************************************************************************/
/*** getX/Y ***/
JSFX.Layer.prototype.getX	= function() 	{ return parseInt(this.style.left); }
JSFX.Layer.prototype.getY	= function() 	{ return parseInt(this.style.top); }
if(ns4)
{
	JSFX.Layer.prototype.getX	= function() 	{ return this.style.left; }
	JSFX.Layer.prototype.getY	= function() 	{ return this.style.top; }
}
/**********************************************************************************/
/*** getWidth/Height ***/
JSFX.Layer.prototype.getWidth		= function() 	{ return this.elem.offsetWidth; }
JSFX.Layer.prototype.getHeight	= function() 	{ return this.elem.offsetHeight; }
if(!document.getElementById)
	JSFX.Layer.prototype.getWidth		= function()
 	{ 
		//Extra processing here for clip
		return this.elem.scrollWidth;
	}

if(ns4)
{
	JSFX.Layer.prototype.getWidth		= function() 	{ return this.style.clip.right; }
	JSFX.Layer.prototype.getHeight	= function() 	{ return this.style.clip.bottom; }
}
/*** End  ***/

/*******************************************************************
*
* File    : JSFX_FloatingLayer.js © JavaScript-FX.com
*
* Created : 2001/03/16
*
* Author  : Roy Whittle www.Roy.Whittle.com
*           
* Purpose : To make and positional div float to
*		one plave on the page and stay there.
*
* History
* Date         Version        Description
*
* 2001-03-17	2.0		Converted for javascript-fx
***********************************************************************/
//---------------------------------------
// modified by m.pieczara@activis.pl
// added anchor arg
// added theDiv param
//---------------------------------------
JSFX.FloatingLayer = function(theDiv, x, y, anchor)
{
	//Call the superclass constructor
	this.superC = JSFX.Layer;
	this.superC(JSFX.findLayer(theDiv), x, y);

	this.baseX = x;
	this.baseY = y;
	this.x = x;
	this.y = y;
	this.moveTo(x,y);
	this.show();

        this.anchor = anchor;
	this.theDiv = theDiv;
}
JSFX.FloatingLayer.prototype = new JSFX.Layer;

JSFX.FloatingLayer.prototype.animate = function()
{
	var targetX;
	var targetY;
//	if(this.baseX > 0)
		targetX = JSFX.Browser.getMinX() + this.baseX;
//	else
//		targetX = JSFX.Browser.getMaxX() + this.baseX;

//	if(this.baseY > 0)
		targetY = JSFX.Browser.getMinY() + this.baseY;
//	else
//		targetY = JSFX.Browser.getMaxY() + this.baseY;

	var dx = (targetX - this.x)/8;
	var dy = (targetY - this.y)/8;
//	  this.x += dx;
        this.y += dy;

        //---------------------------------------
        // modified by m.pieczara@activis.pl
        //---------------------------------------
        if (this.anchor)
        {
            var obj = document.getElementById(this.anchor);
            
            if (obj)
            { 
                this.baseY = obj.offsetTop+1;
                this.baseX = obj.offsetLeft+obj.clientWidth-document.getElementById(this.theDiv).clientWidth-1;
                this.x = obj.offsetLeft+obj.clientWidth-document.getElementById(this.theDiv).clientWidth-1;
            }
        }
        //---------------------------------------

	this.moveTo(this.x, this.y);
}
//---------------------------------------
// modified by m.pieczara@activis.pl
// added anchor arg
//---------------------------------------
JSFX.MakeFloatingLayer = function(theDiv, x, y, anchor)
{
	JSFX.MakeFloatingLayer.floaters[JSFX.MakeFloatingLayer.floaters.length] = new JSFX.FloatingLayer(theDiv, x, y, anchor);
}
JSFX.MakeFloatingLayer.floaters = new Array();
JSFX.MakeFloatingLayer.animate = function()
{
	var i;
	for(i=0 ; i<JSFX.MakeFloatingLayer.floaters.length ; i++)
		JSFX.MakeFloatingLayer.floaters[i].animate();
}
setInterval("JSFX.MakeFloatingLayer.animate()", 30);
/*** End  ***/

function initTimer()
{
	setDate();
}

function initTab()
{
	JSFX.MakeFloatingLayer("menu", document.getElementById('anchor').clientWidth + document.getElementById('anchor').offsetLeft - document.getElementById('menu').clientWidth-1, document.getElementById('anchor').offsetTop+1, "anchor");
}

function init()
{
	initTimer();
	initTab();
}

function setImage(element, file)
{
	document.getElementById(element).src = "images/" + file;
}

function zoom(file,title,width,height) {
	a = null;
	a = window.open('','','toolbar=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,HEIGHT='+height+',WIDTH='+width);
	a.document.open();
	a.document.write("<HTML><HEAD><TITLE>" + title + "</TITLE>");
	a.document.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-2\"><meta http-equiv=\"Imagetoolbar\" content=\"no\"><meta name=\"author\" content=\"Maciej Pieczara\"/><link rel=\"shortcut icon\" href=\"images/seo.ico\"/></HEAD>");
	a.document.write("<BODY style=\"margin:0px;\">");
	a.document.write("<IMG src=\""+file+"\" alt=\""+title+"\" width=\""+width+"\" height=\""+height+"\" border=\"1\">");
	a.document.write("</BODY></HTML>");
	a.focus()
}

function switchMenu(obj){
	if(document.getElementById){
		var inc=1;
		var el;
		while (el = document.getElementById(obj+inc)){
			if (el.style.display!='none'){
				el.style.display='none';
			}else{
				el.style.display='';
			}
			inc++;
		}
	}
}

