function so() {
		co='news1';
	  dajobiekt(co).style.display = 'none';
		co='news2';
	  dajobiekt(co).style.display = 'none';
		co='news3';
	  dajobiekt(co).style.display = 'none';
		co='news4';
	  dajobiekt(co).style.display = 'none';
}

function schowajobr() {
	document.getElementById('obrpowiekszenie').src = 'o/cp.gif';
	document.getElementById('divpowiekszenie').style.left = '-4000px';
	zapasscroll = -1;
}

function obr(jaki) {
	scroll(0,0);
	document.getElementById('divpowiekszenie').style.left = '0px';
	document.getElementById('obrpowiekszenie').src = jaki;
	if (document.all&&document.documentElement.clientHeight) {
	 document.getElementById('divpowiekszenie').style.height= document.documentElement.clientHeight+'px';
	}
	zapasscroll = aktypoz();
	document.getElementById('divpowiekszenie').style.top = zapasscroll+'px';
	//pilnujscrolla();
} 
function ud(co) {
	var jest =    dajobiekt(co).style.display;
	
	if (jest=="none") {
	  dajobiekt(co).style.display = 'block';
	  } else {
	  dajobiekt(co).style.display = 'none';
	  }
}

function udg(co) {
	var jest = dajobiekt(co).style.display;

	dajobiekt("news1").style.display="none";
	dajobiekt("news2").style.display="none";
	dajobiekt("news3").style.display="none";
	dajobiekt("news4").style.display="none";

	if (jest=="block") {
		dajobiekt(co).style.display = 'none';
	} else {
		dajobiekt(co).style.display = 'block';
	}
	
}

function dajobiekt(co) {
  if (document.all) {
    return document.all[co];
  } else {
    return document.getElementById(co);
  }
}

function zamawiam() {
	var ck=CheckCookie("abbott_basket");
	SetCookie("abbott_basket","",1);
	alert('Dziękujemy za złożenie zamówienia ! Skontaktujemy się z Państwem w przeciagu 24 godzin !');
	window.location.href = window.location.href;
}
function delete_basket(id) {
	var ilosc=Math.round((document.getElementById('ilosc'+id).value)*1);

	var ck=CheckCookie("abbott_basket");
	var tck=ck.replace(id+"-"+ilosc+":","");
	SetCookie("abbott_basket",tck,1);
			
	alert('Produkt został usunięty z koszyka !');
	window.location.href = window.location.href;
}
function add_basket(id) {
	var ilosc=Math.round((document.getElementById('ilosc'+id).value)*1);

	var ck=CheckCookie("abbott_basket");
	if (ck) {
		ck=ck+id+"-"+ilosc+":";
		ck=ck.replace("undefined:","");
		SetCookie("abbott_basket",ck,1);
	} else {
		SetCookie("abbott_basket",id+"-"+ilosc+":",1);
	}
	alert('Produkt został dodany do koszyka !');
	
	doPassVar("ok");
}
function doPassVar(args)
{
	var sendText = args;
	window.document.abbott_header.SetVariable("showZamowienia", sendText);
}

function dolittle(mh)
{
		var nazwalayera = 'bio';
		var gor = 0;
		var pra = 240;
		var dol = mh;
		var lew = 0;

		document.getElementById('st').style.height=mh+'px';
				
        if (document.all) {
                document.all[nazwalayera].style.clip = "rect("+gor+"px "+pra+"px "+dol+"px "+lew+"px)";
        } else if (document.getElementById) {
                document.getElementById(nazwalayera).style.clip = "rect("+gor+"px "+pra+"px "+dol+"px "+lew+"px)";
        } else if (document.layers) {
                document.layers[nazwalayera].clip.top = gor;
                document.layers[nazwalayera].clip.left = lew;
                document.layers[nazwalayera].clip.bottom = dol;
                document.layers[nazwalayera].clip.right = pra;
        }
		
/*		var cookie_mh=CheckCookie("menu_height");
		if (mh!=cookie_mh) {
			SetCookie("menu_height",dol,1);
			window.location.href = window.location.href;
		}
		*/
}
 function CheckCookie (CookieName) {
	  var lf = "\n";
    var CookieString = document.cookie;
    var CookieSet = CookieString.split (';');
    var SetSize = CookieSet.length;
    var CookiePieces
    var ReturnValue = "";
    var x = 0;
    for (x = 0; ((x < SetSize) && (ReturnValue == "")); x++) {
      CookiePieces = CookieSet[x].split ('=');
      if (CookiePieces[0].substring (0,1) == ' ') {
        CookiePieces[0] = CookiePieces[0].substring (1, CookiePieces[0].length);
      }
      if (CookiePieces[0] == CookieName) {
        ReturnValue = CookiePieces[1];
      }
     }

     return ReturnValue;
 }
function popup(filename,x,y,type,current_color_set) { 
	windowops = eval("'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,,width=" + x + ",height=" + y + "'"); 
	window.open('popup.php?file='+filename+'&type='+type+'&width='+x+'&height='+y+'&current_color_set='+current_color_set, 'popup', windowops); 
	return; 
}
function accessMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
  
	SetCookie("access_select",selObj.options[selObj.selectedIndex].value,1);
	document.access_update.submit();
}
function load(filename) {
	window.location.href(filename);
	return; 
}
function refreshParent() {
  window.opener.location.href = window.opener.location.href;
}
function center() {
	window.moveTo((screen.width/2)-(550/2), (screen.height /2)-(400/2));
}
function selectPage(id)
{
	SetCookie("page_number",id,1);
	document.select_page.submit();
}
function SetCookie(cookieName,cookieValue,nDays) {
 var today = new Date();
 var expire = new Date();
 if (nDays==null || nDays==0) nDays=1;
 expire.setTime(today.getTime() + 3600000*24*nDays);
 document.cookie = cookieName+"="+cookieValue
                 + ";expires="+expire.toGMTString();
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


