browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
var currentPhotoNr=1;
version = "no";
if (browserName == "Netscape" && browserVer >= 3) version = "ok";
if (browserName == "Microsoft Internet Explorer" && browserVer >= 4) version = "ok";
   
function viewPhoto(numpic)
{
	if (version == "ok")
	{
		if (numpic>=1 || numpic<=3)
			{
				currentPhotoNr=numpic;
				zdj = eval("prePhoto" + numpic + ".src");
			}
			document.getElementById("bigpicture").style.backgroundImage="url("+zdj+")";
	}
}


	
function viewBigPhoto(){
	zdj = eval("bigphoto" + currentPhotoNr);
	var link = "window.open(zdj,\"foto\",\"menubar=no,location=no,toolbar=no,resizable=no,status=no,width=800,height=600,top=0,left=0\");"
	eval(link);

}


function SendHiddenForm(name,value){

	if (name=='FormMiasto'){
		var i;
		var CityTmp;
		CityTmp='';
		for (i=0;i<document.forms['FormCity'].length;i++){
			if (document.forms['FormCity'].elements[i].checked){
			CityTmp=CityTmp+';'+document.forms['FormCity'].elements[i].value;
			}
		}
		value=CityTmp;
	}
		document.forms['SearchForm'].elements[name].value=value;
		document.forms['SearchForm'].submit();
}

function SendFromStatus(page){
	document.forms['SearchForm'].action="/pp3/start.asp?PageName="+page;
	document.forms['SearchForm'].PageName.value=page;
	document.forms['SearchForm'].submit();
}
function ChangeCategoryAndReload(CID){
	document.forms['SearchForm'].elements['CategoryId'].value=CID;
	document.forms['SearchForm'].action='/pp3/start.asp?PageName=search';
	document.forms['SearchForm'].submit();
}

function SelectAll(){
	var i;
	for (i=0;i<document.forms['Formdzielnica'].length;i++)
	{
		if (document.forms['Formdzielnica'].elements[i].value!='')
		{
		document.forms['Formdzielnica'].elements[i].checked=0;
		}
	}
}

function Get_Cookie(name) {
	    var start = document.cookie.indexOf(name+"=");
	    var len = start+name.length+1;
	    if ((!start) && (name != document.cookie.substring(0,name.length))) return null;
	    if (start == -1) return null;
	    var end = document.cookie.indexOf(";",len);
	    if (end == -1) end = document.cookie.length;
	    return unescape(document.cookie.substring(len,end));
}
function Schowek(n,v){
	if (Get_Cookie(n)==null){
		var tmp=v;
	}else{
		var tmp=Get_Cookie(n)+''+v;
	}
	
	document.cookie=n+"="+tmp+"; expires=Fri, 31 Dec 2010 23:59:59 GMT;path=/;";
		document.getElementById("schowekdiv").style.display='none';
		document.getElementById("schowekdiv1").style.display='none';
	}
	
