var ns4=(navigator.appName=='Netscape' && parseInt(navigator.appVersion)==4);
var ns6=(document.getElementById)? true:false;
var ie4=(document.all)? true:false;
var odl;
var f5_m=null;
var skimenu=null;
function overlib(idd)
{	
	if (idd=='')
		idd=1;
	clearTimeout(odl);
	if(ns4)
		{
		over=document.overDiv;
		if (idd==1)
			wysz=document.wysz_right;
		else if (idd!=4 && idd!=5) {
			f1_m=document.f1;
			f2_m=document.f2;
			f3_m=document.f3;
			f4_m=document.f4;
			if (document.f5!=null)
				f5_m=document.f5;
			if (document.bottomskimenu!=null)
				skimenu=document.bottomskimenu;
		}
		}
	if(ie4)
		{
		over=overDiv.style;
		if (idd==1)
			wysz=wysz_right.style;
		else if (idd!=4 && idd!=5) {
			if (idd==2) {
				f1_m=form1.f1.style;	
				f2_m=form1.f2.style;	
				f3_m=form1.f3.style;	
				f4_m=form1.f4.style;	
				if (form1.f5!=null)
					f5_m=form1.f5.style;
				if (document.bottomskimenu!=null)
					skimenu=document.bottomskimenu.style;
			}
			else if (idd==3)
				f1_m=f1.style;
		}
		}
	if(ns6)
		{
		over=document.getElementById("overDiv").style;
		if (idd==1)
			wysz=document.getElementById("wysz_right").style;
		else if (idd!=4 && idd!=5) {
			f1_m=document.getElementById("f1").style;
			f2_m=document.getElementById("f2").style;
			f3_m=document.getElementById("f3").style;
			f4_m=document.getElementById("f4").style;
			if (document.getElementById("f5")!=null)
				f5_m=document.getElementById("f5").style;
			var bskimenu = document.getElementById("bottomskimenu");
			if (bskimenu!=null)
				skimenu=bskimenu.style;
		}
		}
	
	over.display='block';
	if (idd==1)
		wysz.display='none';
	else if (idd!=4 && idd!=5) {
		f1_m.display='none';
		f2_m.display='none';
		f3_m.display='none';
		f4_m.display='none';
		if (f5_m!=null)
			f5_m.display='none';
		if (skimenu!=null)
			skimenu.display='none';
	}
	if (idd==2 || idd==3) {
		obj = document.getElementById("bannerAdNet");
    	if (obj!=null && obj.style!=null)
        	obj.style.display='none';
	}
	if (idd==1 || idd==2) {
        obj = document.getElementById("info_promo");
        if (obj!=null && obj.style!=null)
            obj.style.display='none';
	obj_dlpob = document.getElementById("dl_pob");
        if (obj_dlpob!=null && obj_dlpob.style!=null)
                obj_dlpob.style.display='none';
	obj_menu1 = document.getElementById("stronform");
        if (obj_menu1!=null && obj_menu1.style!=null)
                obj_menu1.style.display='none';
    }
}
function off(idd)
{
	if (idd=='')
		idd=1;
	over.display='none';
	if (idd==1)
		wysz.display='block';
	else if (idd!=4 && idd!=5) {
		f1_m.display='block';
		f2_m.display='block';
		f3_m.display='block';
		f4_m.display='block';
		if (f5_m!=null)
			f5_m.display='block';
		if (skimenu!=null)
			skimenu.display='block';
	}	
	if (idd==2 || idd==3) {
		obj = document.getElementById("bannerAdNet");
    	if (obj!=null && obj.style!=null)
        	obj.style.display='block';
	}
	if (idd==1 || idd==2) {
        obj = document.getElementById("info_promo");
        if (obj!=null && obj.style!=null)
            obj.style.display='block';
	obj_dlpob = document.getElementById("dl_pob");
        if (obj_dlpob!=null && obj_dlpob.style!=null)
                obj_dlpob.style.display='block';
	obj_menu1 = document.getElementById("stronform");
        if (obj_menu1!=null && obj_menu1.style!=null)
                obj_menu1.style.display='block';
    }
}
function off_2s(idd)
{
	if (idd=='')
		idd=1;
	odl=setTimeout("off(" + idd + ")",100);	
}


function switcher(idd)
{
	new AjaxObject101(wstawFormWyszZest).sndReq('get','../wyszajax.xml','grupa=' + idd + '&mode=zest');
}

function changeGrupaProduktow(idd, mode)
{
	if (idd!=null) {
		if (idd.indexOf("samolot")!=-1) {
			switcher('samolot');
		}
		else if (idd.indexOf("autokar")!=-1) {
			switcher('autokar');
		}
		else if (idd.indexOf("wlasny")!=-1) {
			switcher('wlasny');
		}
		else if (idd.indexOf("TOOP00045")!=-1) {
			switcher('direct');
		}
		else if (idd.indexOf("lm=1&promocje=1")!=-1) {
                        switcher('lmpromocja');
                }
		else if (idd.indexOf("promocje=1")!=-1) {
			switcher('promocja');
		}
		else if (idd.indexOf("lm=1")!=-1) {
			switcher('lm');
		}
		else if (idd.indexOf("noProgramy=1")!=-1) {
			switcher('noprogramy');
		}
		else if (idd.indexOf("programy=1&onlyprogramy=1")!=-1) {
			switcher('programy');
		}
		else if (idd.indexOf("allInclusive=1")!=-1) {
			switcher('allinclusive');
		}
		else {
			switcher('all');
		}
	}
	return false;
}

function flash(name,width,height,bgcolor)	{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + 
                'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"' + 
                'width="' + width + '" height="' + height + '">' +
                '<param name="movie" value="/flash/' + name + '"/>' +
                '<param name="quality" value="high" />' +
                '<param name="menu" value="false" />' +
				'<param name="wmode" value="transparent" />' +
                '<param name="BGCOLOR" value="' + bgcolor + '" />' +
				'<embed wmode="transparent" src="/flash/'+name+'" width="'+width+'" height="'+height + '" quality="high"' + 
                    'pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"' + 
                    'menu="false" bgcolor="'+bgcolor+'"></embed>' +
            '</object>');
}

function hasHint(e) {
    if (e.style.color == '#808080' || e.style.color == 'gray') return true;
    return false; 
}

function resetHint(e) {
    if (hasHint(e)) {
        e.value=''; 
        e.style.color='black';
    }
}

function loadInfoBanner(serwis, nr_tel){
	var params = {
			quality: "high",
			allowscriptaccess: "always",
			wmode: "transparent"
		};
		swfobject.embedSWF("http://www.travelone.pl/flash/oferta/infolinia_oferta.swf?ClickTag=http://www."+ serwis +"&nr="+ nr_tel +"&panstwo="+ serwis, "infolinia-left", "183", "79", "9.0.0", "", "", params, "");
}
