﻿	/*var browserName = navigator.appName;
	var browserVersion = parseInt(navigator.appVersion);

	var IE4 = ((browserName=="Microsoft Internet Explorer") && (browserVersion>=4));
	var NS4 = ((browserName=="Netscape") && (browserVersion>=4));
	var IE3 = ((browserName=="Microsoft Internet Explorer") && (browserVersion<4));
	var NS3 = ((browserName=="Netscape") && (browserVersion<4));	

	loaded = false;
	

	function loadImages()
	{
	g1 = new Image();
	g2=new Image();
	g3=new Image();
	g4= new Image();
	g5 = new Image();
	g6=new Image();
	g7=new Image();
	g8= new Image();
	g9= new Image();
	
	g1.src="img/index_1.gif";
	g2.src="img/index_2.gif";
	g3.src="img/index_3.gif";
	g4.src="img/index_4.gif";
	g5.src="img/index_5.gif";
	g6.src="img/index_6.gif";
	g7.src="img/index_7.gif";
	g8.src="img/index_8.gif";
	g9.src="img/index_9.gif";





	loaded = true;

	};
	
if (NS4) {
function zmien(skad,gdzie)
{
if(navigator.userAgent.substring(0,11) != "Mozilla/2.0")
{
	skad = eval(skad + ".src");
	document [gdzie].src = skad;
}
}
};
*/
menu_images = new Array();
menu_sel = "";
for(i=0; i<7; ++i)
{
	g = new Image();
	g.src = "img/menu/menu.01.sel.gif";
	menu_images.push(g);
}
function menu_hl(id,n)
{
	menu_sel = id.src;
	id.src = menu_images[n-1].src;
}
function menu_off(id,n)
{
	id.src = "img/menu/menu.0"+n+".gif";
}

function switch_flash(f,id)
{
	//alert(f+","+id);
//	if(f=='detale')
	//	f = 'galeria';
	switch(f)
	{
		case 'kolory':
			break;
		case 'colours':
			break;
		case 'galeria_multi':
			break;
		default:
			f = 'galeria';
	}
	document.getElementById('flashMain').innerHTML = "";
	var so = new SWFObject("flash/"+f+".swf?tab_id="+id,"flashSwf","550","421","8","#FFFFFF");
	so.addParam("scale","noscale");
	so.addParam("salign","top");
	so.addParam("menu","false");
	so.write("flashMain");
}

function zajawka(z)
{
	document.getElementById('flashMain').innerHTML = "<img src=\""+z+"\" />";
}

function no_flash()
{
	document.getElementById('flashMain').innerHTML = "";
}

function check(){

	var emailRegExp = /^[A-Za-z0-9._\-]+@[A-Za-z0-9]([A-Za-z0-9._\-]*\.)+[A-Za-z]+$/;
	var fileRegExp = /\.(doc|rtf|pdf)$/i;

	if (document.form1.p10.value!=""){
		if (!emailRegExp.test(document.form1.p10.value)){
			alert('Please give a correct e-mail address!');
			document.form1.p10.focus();
			return false;
		}
	}
	
	if (document.form1.p12.value!=""){
		if (!fileRegExp.test(document.form1.p12.value)){
			alert('Please give a correct file !');
			document.form1.p12.focus();
			return false;
			}
		}

	if (!document.form1.p1.value){
		alert('Please fill: Company');			
		document.form1.p1.focus();
		return false;
	}

	if (!document.form1.p2.value){
		alert('Please fill: Name');			
		document.form1.p2.focus();
		return false;
	}
	if (!document.form1.p3.value){
		alert('Please fill: Surname');			
		document.form1.p3.focus();
		return false;
	}
	if (!document.form1.p7.value){
		alert('Please fill: Town');			
		document.form1.p7.focus();
		return false;
	}
	if (!document.form1.p8.value){
		alert('Please fill: Telephone');			
		document.form1.p8.focus();
		return false;
	}
	/*
	if (!document.form1.p10.value){
		alert('Musisz wypełnić pole: e-mail');			
		document.form1.p10.focus();
		return false;
	}
	*/

	if (!document.form1.a18.checked){
		alert('You have to give your consent to processing and using your particulars for marketing purposes by ASPEKT*');
		return false;
	}

	return true;
}
function show_pok()
{
	document.getElementById('instr').style.display = 'none';
	document.getElementById('pok').style.display = 'block';
}

function change(img1,img2)
{
	if (img2.complete){
		img1.src = img2.src;
		return true;
	}
}
function pop(name, url, w, h, scroll, ret)
{
    x = screen.availWidth/2-w/2;
    y = screen.availHeight/2-h/2;
    window.open(url, name, 'width=' + w + ',height=' + h + ',resizable=0, scrollbars=' + scroll + ', menubar=no,status=1, left='+x+', top='+y );
    if (ret) return false;
}
/*
function okienko2(url, width, height) {
	width1=width/2;
	height1=height/2;
	x=screen.availWidth/2-width1;
	y=screen.availHeight/2-height1;
    var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=yes, menubar=no, left='+x+', top='+y );
	Win.resizeTo(width, height);
	Win.focus();
};

function okienko(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=no, menubar=no' );
		Win.resizeTo(width, height);
		Win.focus();
  
};

function okienko3(url, width, height) {
		width1=width/2;
		height1=height/2;
		x=screen.availWidth/2-width1;
		y=screen.availHeight/2-height1;
        var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=1, menubar=1, toolbar=1,left='+x+', top='+y);
};

function DoPrinting(){
if (!window.print){
alert("brak obsługi funkcji drukowania")
return
}
window.print()
}

function bookmarkit(){
window.external.addFavorite('http://projekty.os3.pl/apap','APAP')
}

var bookmarkurl=document.location
var bookmarktitle=document.title

function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function spr_haslo(f){
if (f.haslo.value.toLowerCase()=='paracetamolum')  document.location.href="specjalisci_szcz.html"; else
alert('Logowanie niepoprawne!\n\nSpróbuj jeszcze raz.');
return false;
}

function spr_polec(f){
if (f.email_od.value.indexOf('@')==-1) {alert('Niepoprawny adres email nadawcy'); return false;}
if (f.email_do.value.indexOf('@')==-1) {alert('Niepoprawny adres email odbiorcy'); return false;}
return true;
}

function odpal(){
window.open('http://system.livechat.pl/licence/201700/open_chat.cgi?groups=0&file_no_ops=201700.jpg'+'&s=1&lang=pl&dc='+escape(document.cookie+';l='+document.location+';r='+document.referer+';s='+typeof lc_session),'Czat_201700','width=604,height=247,resizable=no,scrollbars=no,status=1');
}*/