<!--

/* ADMIN */


		function ZmienStatusWarstwy(DivID) {
		   var obj = document.layers ? document.layers[DivID] : document.getElementById ? document.getElementById(DivID).style : document.all[DivID].style;
		   obj.display = document.layers ? (obj.display=="block" ? "none" : "block") : (obj.display=="block" ? "none" : "block");
		   document.forms.data_form.elements[DivID].value = obj.display=="none" ? "0" : "1";
		   document.images[DivID + "_img"].src = obj.display=="none" ? '/s/themes/1/srodek/set_e.gif': '/s/themes/1/srodek/set_c.gif';
		   document.images[DivID + "_img"].title = obj.display=="none" ? 'Rozwiń': 'Zwiń';
		}


		function Aktualizuj_UPR_ALL() {
			upr_1 = document.forms.data_form.elements["MSVARS[upr_1]"].checked;
			upr_2 = document.forms.data_form.elements["MSVARS[upr_2]"].checked;
			upr_3 = document.forms.data_form.elements["MSVARS[upr_3]"].checked;
			upr_4 = document.forms.data_form.elements["MSVARS[upr_4]"].checked;
			upr_5 = document.forms.data_form.elements["MSVARS[upr_5]"].checked;
			upr_6 = document.forms.data_form.elements["MSVARS[upr_6]"].checked;
			upr_7 = document.forms.data_form.elements["MSVARS[upr_7]"].checked;

			if (upr_1==true && upr_2==true && upr_3==true && upr_4==true && upr_5==true && upr_6==true && upr_7==true) {
				document.forms.data_form.elements["MSVARS[upr_all]"].checked = true;
			} else {
				document.forms.data_form.elements["MSVARS[upr_all]"].checked = false;
			}
		}


		function Aktualizuj_UPR() {
			upr_all = document.forms.data_form.elements["MSVARS[upr_all]"].checked;

			if (upr_all==true) {
				document.forms.data_form.elements["MSVARS[upr_1]"].checked = true;
				document.forms.data_form.elements["MSVARS[upr_2]"].checked = true;
				document.forms.data_form.elements["MSVARS[upr_3]"].checked = true;
				document.forms.data_form.elements["MSVARS[upr_4]"].checked = true;
				document.forms.data_form.elements["MSVARS[upr_5]"].checked = true;
				document.forms.data_form.elements["MSVARS[upr_6]"].checked = true;
				document.forms.data_form.elements["MSVARS[upr_7]"].checked = true;
			} else {
				document.forms.data_form.elements["MSVARS[upr_1]"].checked = false;
				document.forms.data_form.elements["MSVARS[upr_2]"].checked = false;
				document.forms.data_form.elements["MSVARS[upr_3]"].checked = false;
				document.forms.data_form.elements["MSVARS[upr_4]"].checked = false;
				document.forms.data_form.elements["MSVARS[upr_5]"].checked = false;
				document.forms.data_form.elements["MSVARS[upr_6]"].checked = false;
				document.forms.data_form.elements["MSVARS[upr_7]"].checked = false;
			}
		}


		function AdminShowPhoto(ida,fn,width,height) {
			width = parseInt(width)+20;
			height = parseInt(height)+45;
			PhotoWindow = window.open('/admin/admin_show_photo.php/ida/'+ ida +'/fn/'+ fn,'PhotoWindow','width=' + width + ',height=' + height + ',scrollbars=no,toolbar=no,menubar=no,status=no,location=no,personalbar=no,directories=no,dependent=yes,resizable=no');
			PhotoWindow.moveTo((screen.width - width)/2,(screen.height - height)/2);
			PhotoWindow.focus();
		}


		function AdminShowCalendar(fn,date) {
			width = 160;
			height = 151;
			CalendarWindow = window.open('/admin/admin_show_calendar.php/fn/'+ fn +'/date/'+ date +'/?sel=1','CalendarWindow','width=' + width + ',height=' + height + ',scrollbars=no,toolbar=no,menubar=no,status=no,location=no,personalbar=no,directories=no,dependent=yes,resizable=no');
			CalendarWindow.moveTo((screen.width - width)/2,(screen.height - height)/2);
			CalendarWindow.focus();
		}


		function AdminClearDate(fn) {
			this.document.forms.data_form.elements['MSVARS['+fn+']'].value='0000-00-00';
		}


		function Artykuly_Tresc_Upload_Files(id,width,height) {
			width = parseInt(width)+20;
			height = parseInt(height)+45;
			ArtykulyTrescUploadFiles = window.open('/admin/artykuly_tresc_upload_files.php/ida/'+ id,'ArtykulyTrescUploadFiles','width=' + width + ',height=' + height + ',scrollbars=yes,toolbar=no,menubar=no,status=no,location=no,personalbar=no,directories=no,dependent=yes,resizable=no');
			ArtykulyTrescUploadFiles.moveTo((screen.width - width)/2,(screen.height - height)/2);
			ArtykulyTrescUploadFiles.focus();
		}


		function Artykuly_Layouty_Upload_CSS(width,height) {
			width = parseInt(width)+20;
			height = parseInt(height)+45;
			ArtykulyLayoutyUploadCSS = window.open('/admin/artykuly_layouty_upload_css.php/','ArtykulyLayoutyUploadCSS','width=' + width + ',height=' + height + ',scrollbars=yes,toolbar=no,menubar=no,status=no,location=no,personalbar=no,directories=no,dependent=yes,resizable=no');
			ArtykulyLayoutyUploadCSS.moveTo((screen.width - width)/2,(screen.height - height)/2);
			ArtykulyLayoutyUploadCSS.focus();
		}


		function Artykuly_Layouty_Upload_Files(id,width,height) {
			width = parseInt(width)+20;
			height = parseInt(height)+45;
			ArtykulyLayoutyUploadFiles = window.open('/admin/artykuly_layouty_upload_files.php/idl/' + id,'ArtykulyLayoutyUploadFiles','width=' + width + ',height=' + height + ',scrollbars=yes,toolbar=no,menubar=no,status=no,location=no,personalbar=no,directories=no,dependent=yes,resizable=no');
			ArtykulyLayoutyUploadFiles.moveTo((screen.width - width)/2,(screen.height - height)/2);
			ArtykulyLayoutyUploadFiles.focus();
		}


		function Moduly_Aktualnosci_Upload_Files(id,width,height) {
			width = parseInt(width)+20;
			height = parseInt(height)+45;
			ModulyAktualnosciUploadFiles = window.open('/admin/moduly_aktualnosci_upload_files.php/idn/'+ id,'ModulyAktualnosciUploadFiles','width=' + width + ',height=' + height + ',scrollbars=yes,toolbar=no,menubar=no,status=no,location=no,personalbar=no,directories=no,dependent=yes,resizable=no');
			ModulyAktualnosciUploadFiles.moveTo((screen.width - width)/2,(screen.height - height)/2);
			ModulyAktualnosciUploadFiles.focus();
		}


		function Moduly_Katalog_Tkaniny_Upload_Files(id,width,height) {
			width = parseInt(width)+20;
			height = parseInt(height)+45;
			ModulyKatalogTkaninyUploadFiles = window.open('/admin/moduly_katalog_tkaniny_upload_files.php/idp/'+ id,'ModulyKatalogTkaninyUploadFiles','width=' + width + ',height=' + height + ',scrollbars=yes,toolbar=no,menubar=no,status=no,location=no,personalbar=no,directories=no,dependent=yes,resizable=no');
			ModulyKatalogTkaninyUploadFiles.moveTo((screen.width - width)/2,(screen.height - height)/2);
			ModulyKatalogTkaninyUploadFiles.focus();
		}


		function ChangeProductPhoto(photoUrl) {
			document.images["productImage"].src = photoUrl;
		}


		function Admin_Show_Photo(file,width,height) {
			width = parseInt(width)+4;
			height = parseInt(height)+45;
			AdminShowPhoto = window.open('/admin/admin_show_photo.php?file=' + file,'AdminShowPhoto','width=' + width + ',height=' + height + ',scrollbars=no,toolbar=no,menubar=no,status=no,location=no,personalbar=no,directories=no,dependent=yes,resizable=no');
			AdminShowPhoto.moveTo((screen.width - width)/2,(screen.height - height)/2);
			AdminShowPhoto.focus();
		}


/* STRONA */

		function PageShowPhoto(idp,width,height,lang) {
			width = parseInt(width)+30;
			height = parseInt(height)+150;
			PhotoWindow = window.open('/page_sph.php/idp/' + idp +'/lang/'+ lang,'PhotoWindow','width=' + width + ',height=' + height + ',scrollbars=yes,toolbar=no,menubar=no,status=no,location=no,personalbar=no,directories=no,dependent=yes,resizable=no');
			PhotoWindow.moveTo((screen.width - width)/2,(screen.height - height)/2);
			PhotoWindow.focus();
		}

/* OGÓLNE */

		function MM_preloadImages() { //v3.0
		  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
			var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
			if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
		}

		function MM_jumpMenu(targ,selObj,restore){ //v3.0
		  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
		  if (restore) selObj.selectedIndex=0;
		}

		function SetStatus(status_text) {   
			window.defaultStatus = status_text;
			window.status = status_text;
		}

		function CloseWindow() {
			self.close();
		}

//-->