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;
function overlib(idd)
{	
	if (idd=='')
		idd=1;
	clearTimeout(odl);
	if(ns4)
		{
		over=document.overDiv;
		}
	if(ie4)
		{
		over=overDiv.style;
		wysz=wyszukiwarka_content.style;
		wysz.display='none';
		}
	if(ns6)
		{
		over=document.getElementById("overDiv").style;
		}
	over.display='block';
	if (idd==2 || idd==3) {
		obj = document.getElementById("bannerAdNet");
    	if (obj!=null && obj.style!=null)
        	obj.style.display='none';
			obj2 = document.getElementById("bannerAdNetPromo");
        if (obj2!=null && obj2.style!=null)
                obj2.style.display='none';
	}
	if (idd==1 || idd==2) {
        obj = document.getElementById("sciezka");
        if (obj!=null && obj.style!=null)
            obj.style.display='none';
        obj3 = document.getElementById("mapka");
        if (obj3!=null && obj3.style!=null)
            obj3.style.display='none';
	obj4 = document.getElementById("samochod");
        if (obj4!=null && obj4.style!=null)
            obj4.style.display='none';
	obj5 = document.getElementById("plakaty_main");
        if (obj5!=null && obj5.style!=null)
            obj5.style.display='none';
	obj6 = document.getElementById("drzewko");
        if (obj6!=null && obj6.style!=null)
            obj6.style.display='none';
	obj7 = document.getElementById("gwarancja");
        if (obj7!=null && obj7.style!=null)
            obj7.style.display='none';
    }
}
function off(idd)
{
	if (idd=='')
		idd=1;
	over.display='none';
	if(ie4)
		wysz.display='block';
	if (idd==2 || idd==3) {
		obj = document.getElementById("bannerAdNet");
    	if (obj!=null && obj.style!=null)
        	obj.style.display='block';
			obj2 = document.getElementById("bannerAdNetPromo");
        if (obj2!=null && obj2.style!=null)
                obj2.style.display='block';
	}
	if (idd==1 || idd==2) {
        obj = document.getElementById("sciezka");
        if (obj!=null && obj.style!=null)
            obj.style.display='block';
        obj3 = document.getElementById("mapka");
        if (obj3!=null && obj3.style!=null)
            obj3.style.display='block';
	obj4 = document.getElementById("samochod");
        if (obj4!=null && obj4.style!=null)
            obj4.style.display='block';
	obj5 = document.getElementById("plakaty_main");
        if (obj5!=null && obj5.style!=null)
            obj5.style.display='block';
	obj6 = document.getElementById("drzewko");
        if (obj6!=null && obj6.style!=null)
            obj6.style.display='block';
        obj7 = document.getElementById("gwarancja");
        if (obj7!=null && obj7.style!=null)
            obj7.style.display='block';
    }
}
function off_2s(idd)
{
	if (idd=='')
		idd=1;
	odl=setTimeout("off(" + idd + ")",100);	
}

function changestyle(obj, active)
{
	if (obj!=null) {
		if (active=='1')
			obj.className='zak_m_akt';
		else
			obj.className='zak_m_nakt';
	}
}



function switcher(idd)
{
    
   new AjaxObject101(wstawFormWyszFront).sndReq('get','wyszajax.xml','grupa=' + idd);
	              
     
}

function changeGrupaProduktow(idd)
{
	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)	{
var newName = name;
if(newName.indexOf("http")!="0")
newName = "/flash/" + name;

document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + 
						'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"' + 
						'width="' + width + '" height="' + height + '">' +
	'<param name="movie" value="' + newName + '"/>' +
	'<param name="quality" value="high" />' +
	'<param name="menu" value="false" />' +
	'<param name="wmode" value="transparent" />' +
	'<param name="BGCOLOR" value="' + bgcolor + '" />' +
	'<embed wmode="transparent" src="'+newName+'" 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 flashID(name,nameId,width,height,bgcolor)	{

document.getElementById('mapka_flash').innerHTML = 
'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + 
		 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"' + 
		 'width="' + width + '" height="' + height + '" id="' + nameId + '">' +
	'<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 + '" />' +
	'<param name="swliveconnect" value="true">' +
		'<embed wmode="transparent" name="' + nameId + '" src="/flash/'+name+'" width="'+width+'" height="'+height + '" quality="high" swliveconnect="true"' + 
			'pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"' + 
			'menu="false" bgcolor="'+bgcolor+'"></embed>' +
'</object>';
}

function flashtrans(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 src="/flash/'+name+'" width="'+width+'" height="'+height + '" quality="high"' +
			'pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"' +
			'menu="false" wmode="transparent" bgcolor="'+bgcolor+'"></embed>' +
	'</object>');
}

function hasHint(contr) {
    if (contr!=null && contr.style!=null) 
		if (contr.style.color == '#808080' || contr.style.color == 'gray') return true;
    return false; 
}

function resetHint(contr) {
    if (hasHint(contr)) {
        contr.value=''; 
        contr.style.color='black';
    }
}

