// JavaScript Document



function add_load_event(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}


	

/*
function share(){
	if (!document.getElementById("bookmark_link")) return false;
	var bookmark = document.getElementById("bookmark_link");
		bookmark.onclick=function(){
			var ul = document.getElementById("bookmark").getElementsByTagName("ul")[0];
			ul.style.display = "block";
			//this.getElementsByTagName('a')[0].style.backgroundColor="#FFAA13";
			//var linktous = document.getElementById("link");
			//var email = document.getElementById("email");
			//linktous.getElementsByTagName('a')[0].style.backgroundColor="#e6e6e6";
			//email.getElementsByTagName('a')[0].style.backgroundColor="#e6e6e6";
			var linktous = document.getElementById("link");
			var dl = linktous.getElementsByTagName("dl")[0];
			dl.style.display = "none";
			var email = document.getElementById("email_to_friend");
			//var email_dl = email.getElementsByTagName("dl")[0];
			email.style.display = "none";
			return false;
		}
		
		var linktous = document.getElementById("link_to_us_link");
		
		linktous.onclick = function(){
			var linktous = document.getElementById("link");
			var dl = linktous.getElementsByTagName("dl")[0];
			
			dl.style.display = "block";
			alert("hello");
			
			var bookmark = document.getElementById("bookmark");
			
			var ul = bookmark.getElementsByTagName("ul")[0];
			ul.style.display = "none";
			var email = document.getElementById("email_to_friend");
			//var email_dl = email.getElementsByTagName("dl")[0];
			email.style.display = "none";
			
			return false;
			
		}
		
		var email = document.getElementById("email_link");
		email.onclick=function(){
			var email = document.getElementById("email_to_friend");
			//var email_dl = email.getElementsByTagName("dl")[0];
			email.style.display = "block";
			var linktous = document.getElementById("link");
			var dl = linktous.getElementsByTagName("dl")[0];
			dl.style.display = "none";
			var bookmark = document.getElementById("bookmark");
			var ul = bookmark.getElementsByTagName("ul")[0];
			ul.style.display = "none";
			return false;
			
		}
		
		var printpage = document.getElementById("print_link");
		printpage.onclick=function(){
			window.print();
			return false;
		}
		
		var myform= document.getElementById("email_to_friend");
		var button = myform.getElementsByTagName("button")[0];
		button.onclick = function(){
			var myform= document.getElementById("email_to_friend");
			 myform.submit();
		}
		
	
}
add_load_event(share);
*/








/****************************** Seminar download tracking ********************/

function trackLink(elLnk){

	
	var regLocal = new RegExp("^http?:\\/\\/"+window.location.hostname);
	var path = elLnk.href.replace(regLocal,'');
	
	//alert(path);
	
	if(path && path.indexOf('/') === 0){
		pageTracker._trackPageview(path);
	}
	
}