//function addEvent(obj, evType, fn){ try { if (obj.addEventListener){ obj.addEventListener(evType, fn, false); return true; } else if (obj.attachEvent){ var r = obj.attachEvent("on"+evType, fn); return r; } else { return false; }}catch(e){}}

function externalLinks() { if (!document.getElementsByTagName) return; var anchors = document.getElementsByTagName("a"); for (var i=0; i<anchors.length; i++) {  var anchor = anchors[i];  if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") anchor.target = "_blank";}}

function hide(name){ document.getElementById(name).style.display='none'; } 

function show(name){ document.getElementById(name).style.display=''; } 

function reverseVisibility(name){
a = document.getElementById(name)
if( a.style.display == 'none')	a.style.display = ''
else a.style.display='none'; }

function hideTab(name){
ce = document.getElementById(name); 
ce.style.display = 'none'; cep = document.getElementById(name+'_tab');
cep.setAttribute("className", "") ; cep.setAttribute("class", ""); 
}

function showTab(name, cls){
ce = document.getElementById(name); ce.style.display = ''; 
cep = document.getElementById(name+'_tab');
cep.setAttribute("className", cls) ; cep.setAttribute("class", cls); 
}

function hideTab2(name,cls){
ce = document.getElementById(name); 
ce.style.display = 'none'; cep = document.getElementById(name+'_tab');
cep.setAttribute("className", cls) ; cep.setAttribute("class", cls); 
}

function hideSlash(name){
ce = document.getElementById(name); 
ce.style.display = 'none';  
}

function showSlash(name){
ce = document.getElementById(name); ce.style.display = ''; 
}

function hideAfter(time,name){ setTimeout("hide('"+name+"')", time); }

function selectRange(oText, start, length){  
if (oText.createTextRange) {  var oRange = oText.createTextRange();  oRange.moveStart("character", start);  oRange.moveEnd("character", length - oText.value.length); oRange.select(); }
else if (oText.setSelectionRange) { oText.setSelectionRange(start, length); } oText.focus(); }

// fontSize
function setFontSize(a){
var divF = document.getElementById("fckeditor");
divF.style.fontSize= a+"px";
z=divF.ChildNodes;
x= document.getElementById("fckeditor").getElementsByTagName("p");
for (var i=0;i<x.length;i++) { x[i].style.fontSize = a+"px"; }
x= document.getElementById("fckeditor").getElementsByTagName("li");
for (var i=0;i<x.length;i++) { x[i].style.fontSize = a+"px";  }
}

function changeUrl(a,b,c,d) {
	window.location.href=b+'Catalogue/exeConcrete/,,'+a+'?from='+c;
}

function PopUp(l, w, h) {
	w = window.open('','','resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width='+w+',height='+h+',left=0,top=0');

	d = w.document
	d.writeln('<html>')
	d.writeln('<head>')
	d.writeln('<style type="text/css">body {background-color:0xFFFFFF;margin: 0px 0px 0px 0px;padding: 0px 0px 0px 0px;}</style>')
	d.writeln('<title>Kliknij na zdjęciu, aby zamknąć okno.</title>')
	d.writeln('</head>')
	d.writeln('<body>')
	d.writeln('<a href="javascript:self.close()"><img alt="Close window" src="'+l+'" border="0"></a>')
	d.writeln('</body>')
	d.writeln('</html>')
	d.close()
	return false;
}

function PopUpLnkWS(l, w, h) {
	w = window.open(l,'','resizable=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,fullscreen=no,dependent=no,width='+w+',height='+h+',left=0,top=0');
	return false;
}

//rejestrowanie wymaganych event�w
//addEvent(window,"load",externalLinks());
