/* 
	(c) 2010, Mediaweb Studio 
*/


function AttachEvent(obj,evt,fnc,useCapture){
	if (!useCapture) useCapture=false;
	if (obj.addEventListener){
		obj.addEventListener(evt,fnc,useCapture);
		return true;
	} else if (obj.attachEvent) return obj.attachEvent("on"+evt,fnc);
	else{
		MyAttachEvent(obj,evt,fnc);
		obj['on'+evt]=function(){ MyFireEvent(obj,evt) };
	}
}



sfHover = function() {
	var sfEls = document.getElementById("topMenu").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}



if(navigator.userAgent.indexOf('Opera 8')>-1 || navigator.userAgent.indexOf('MSIE 6')>-1 || navigator.userAgent.indexOf('MSIE 5')>-1){
  AttachEvent(window,"load",sfHover);
}

//alert(navigator.userAgent);


function setPrintCSS(){
  if (document.getElementsByTagName){
    x = document.getElementsByTagName('link');
  }else if (document.all){
    x = document.all.tags('link');
  }else{
    return;
  }
  for(var i=0;i<x.length;i++){
    if(x[i].media=='print'){
      x[i].media = 'all';
    }else{
      x[i].href = '';
    }
  }
}
if(document.location.hash=='#print'){
  AttachEvent(window,"load",setPrintCSS);
}



function printThisPage(){
  
  window.open(window.location+'#print', 'show', 'width=800, height=600, toolbar=yes, scrollbars=yes, menubar=yes');
  
}



