if (navigator.appName == "Microsoft Internet Explorer") {
if (parent.frames.length)  
  top.location.href = document.location; 
}

function extrWindow(file,nazwa,szer,wys,inne) 
{  
  param='height='+wys+',width='+szer+',toolbar=no,resizable,scrollbars=yes';
  if(inne) param=param+','+inne;
  //alert(param);
  
  Okno=window.open(file,nazwa,param);
  //if (navigator.userAgent.indexOf('Mozilla/4')==0) Okno.focus();
  //if (navigator.appName.indexOf('Netscape')==0) {
  	if (window.focus)
  		Okno.focus();
  //}
}

function extrWindowMovie(link,name){
      var width = window.screen.width;
      if(width > 1024) {
      	wwidth = 1085
      	wheight = 820
	}
      else if(width > 800) {
      	wwidth = 1024
      	wheight = 770
      	}
      else {
      	wwidth = 800
      	wheight = 600
      }
      return extrWindow(link,name,wwidth,wheight);
}

function openChat(file,szer,wys) 
{  
  param='height='+wys+',width='+szer+',location=0, toolbar=0, directories=0, status=1, menubar=0, scrollbars=0, resizable=0, fullscreen=0, channelmode=0';
  //alert(param);
  date = new Date ();
  nazwa='a'+String(date.getTime());
  Okno=window.open(file,nazwa,param);
  //if (navigator.userAgent.indexOf('Mozilla/4')==0) Okno.focus();
  if (navigator.appName.indexOf('Netscape')==0) Okno.focus();
}

//START skrypty do leków
function CheckSelected(formname)
{
	if (eval("document." + formname + "." + "id.selectedIndex")<0) {	
	alert('Zaznacz jedn± pozycję w li¶cie!');
	return false;
	}
	else return true;
}

function CheckSelected_STARA(formname)
{
	//if (eval ("document." + formname + "." + "id.value")=='') {
	if ((eval ("document." + formname + "." + "id.value")=='') || (eval ("document." + formname + "." + "id.value")==null)) {	
	alert('Zaznacz jedn± pozycję w li¶cie!');
	return false;
	}
	else return true;
}
//KONIEC skrypty do leków
//START skrypty do ksiegarni

function SelectAll(fromElem, toElem)
{
var frm = document.frmSelect;
for (i=fromElem;i<= toElem; i++) frm.elements[i].checked = true;
} 

function DeSelectAll(fromElem, toElem)
{
var frm = document.frmSelect;
for (i=fromElem;i<= toElem; i++) frm.elements[i].checked = false;
} 

function SelectCheckbox(fromElem, toElem, maxElem, bChecked)
{
var frm = document.frmSelect;
for (i=fromElem;i<= maxElem; i++) frm.elements[i].checked = false;

for (i=fromElem;i<= toElem; i++)
	if (bChecked && !frm.elements[i].checked) {
		//frm.elements[i].click();
		frm.elements[i].checked =  bChecked;
	} else {
		frm.elements[i].checked =  bChecked;
	}
} // func SelectCheckbox

function JoinedSelect(co) {
	if( co.checked ) co.checked = false;
	else co.checked = true;
}
//KONIEC skrypty do ksiegarni


//skrypty od digitalone.pl
noweOkienko = null;
function link(src, w, h){
  if(window.screen){
    aw=screen.availWidth;
    ah=screen.availHeight;
  }else{
    aw=640;
    ah=450;
  }
  if(noweOkienko==null || noweOkienko.closed){
    ustawienia=
     "left=" + (aw-w)/2 + ","
    +"top=" + (ah-h)/2 + ","
    +"screenX=" + (aw-w)/2 + ","
    +"screenY=" + (ah-h)/2 + ","
    +"width=" + w + ","
    +"height=" + h + ","
    +"innerWidth=" + w + ","
    +"innerHeight=" + h + ","
    +"toolbar=no,"
    +"location=no,"
    +"directories=no,"
    +"status=yes,"
    +"menubar=no,"
    +"scrollbars=no,"
    +"resizable=no"
    noweOkienko = window.open(src,'nowe_okienko',ustawienia);
  }
  //noweOkienko.document.open("index.html");
  //noweOkienko.document.clear();
  //noweOkienko.document.write(index.html);

  //noweOkienko.document.close();
  if (navigator.appName.indexOf('Mozilla')==0) noweOkienko.focus();
}
//KONIEC skrypty od digitalone.pl
