
function login (link)
{

        window.open (link, "Login", "toolbars=no, location=no, directories=no, status=yes, menubar=no, scrollbars=no, resizable=no, width=200, height=170");

}

function LocationReplace(link)
{

         location.replace (link);

}

function help (url)
{
window.open ('url', "Help", "toolbars=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=200, height=200");
}

function plist (url)
{
window.open (url, "List produktów", "toolbars=no, location=yes directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, width=300, height=400");
}

function ProductPhoto(url, size_x, size_y)
{
if (isNN())
{
document.getElementById('prodphoto').src=url; 
document.getElementById('pict_layer').style.visibility='visible'; 
document.getElementById('szara_maska').style.visibility='visible';
}
if (isIE()) {
var fotografia = window.open (url, "fotka", "toolbars=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizeable=no, width="+size_x+", height="+size_y);
fotografia.resizeTo(size_x, size_y);
fotografia.focus();
}
}

function PierwszePoleFormularzaDodajProdukt ()
{
         document.dodajprodukt.nazwa.select();
}
function isIE()
{
if (navigator.appName=="Microsoft Internet Explorer") return parseFloat(navigator.appVersion);
else return false;
}

function isNN()
{
if (navigator.appName=="Netscape") return parseFloat(navigator.appVersion);
else return false;
}

function windowwidth()
{
if (isIE()) width=document.body.scrollWidth;
else if (isNN()) width=window.innerWidth;
else return document.body.scrollWidth;
return width;
}
function windowheight()
{
if (isIE()) width=document.body.scrollHeight;
else if (isNN()) width=window.innerHeight;
else return document.body.scrollHeight;
return width;
}
function displaybox(id)
{
var stan=document.getElementById(id).style.display;
if (stan=='block') document.getElementById(id).style.display='none';
else if (stan=='hidden') document.getElementById(id).style.display='block';
else document.getElementById(id).style.display='block';
}

function features_set_off()
{
for (i=1; i<=nfeatures; i++)
   {
    document.getElementById('f'+i).style.display='none';
	document.getElementById('fc'+i).style.clear='none';
	document.getElementById('fc'+i).style.marginTop='2px';
	}
}

function change_display(element_id) {
    features_set_off();
	
    document.getElementById('f'+element_id).style.display='block';
	document.getElementById('fc'+element_id).style.clear='both';
	if (element_id!='1') document.getElementById('fc'+element_id).style.marginTop='30px';
	
}
/*
function przechowalnia()
{
fotografia= window.open("productphoto.php3?poid="+phoid);


}   */
