// JavaScript Document

/* apply css 'hover' to elements 
jsHover = function() {
		var hEls = document.getElementById('anketa');
		for (var i=0, len=hEls.length; i<len; i++) {
			hEls[i].onmouseover=function() { this.className+=" jshover"; }
			hEls[i].onmouseout=function() { this.className=this.className.replace(" jshover", ""); }
		}
	}
	if (window.attachEvent && navigator.userAgent.indexOf("Opera")==-1) window.attachEvent("onload", jsHover);	
*/


function openGallery(path)
{
 	
	h = 800
 	w = 600
 
	t = (screen.availHeight-h)/2;
	l = (screen.availWidth-w)/2;
	
  	window.open(path, null, "scrollbars=yes,resizable=no,left="+l+",top="+t+"height="+h+",width="+w+",status=no,titlebar=no,toolbar=no,menubar=no,location=no");
	
}



function get_last_days()
			{	
				d0 = new Date('July 30 , 2007');
				t0 = d0.getTime();
				d1 = new Date();
				t1 = d1.getTime();
				
				k1 = 1000*3660*24;
				k2 = 1000*3600;
				k3 = 1000*60;
				days = Math.floor((t0 - t1) / (k1));	
				hours =  Math.floor((t0 - t1 - days*k1)/(k2));
				minutes =  Math.floor((t0 - t1 - days*k1 - hours*k2)/(k3)) + 1;
				secundes = Math.floor((t0 - t1 - days*k1 - hours*k2 - (minutes-1)*k3)/(1000)) ;
				
				result = days+':'+hours+':'+minutes+':'+secundes;
				document.getElementById("timer_text").innerHTML = result;	
				setTimeout("get_last_days()",1000);
			}			

	
	function visible(itemId){
		var elem = document.getElementById(itemId);
		if(elem.style.display == 'block')
			elem.style.display = 'none';
		else
			elem.style.display = 'block';
		return true;
	}
	
	function set_hw(itemId,width,height)
	{
		var elem = document.getElementById(itemId);
		elem.style.height = height;
		elem.style.width = width;
	}
	
	
	function flash_can_play()
	{
		var MM_contentVersion = 6;
		var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
		if ( plugin ) {
				var words = navigator.plugins["Shockwave Flash"].description.split(" ");
				for (var i = 0; i < words.length; ++i)
				{
				if (isNaN(parseInt(words[i])))
				continue;
				var MM_PluginVersion = words[i];
				}
			var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
		}
		else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
		   && (navigator.appVersion.indexOf("Win") != -1)) {
			document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
			document.write('on error resume next \n');
			document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
			document.write('</SCR' + 'IPT\> \n');
		}
		return(MM_FlashCanPlay);
	}
