/**** ONLOAD FUNCTION ***/
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

function createpopup(target){
	if(target.match(/^.*videopopup$/)){
		var height = 550;
		var width = 660;
		
		var topPos = ((screen.height / 2) - ( height / 2));
		var leftPos = (screen.width / 2) - (width /2);
		window.open(target, 'ClientOpinions', 'width='+width+',height=' + height + ',left='+leftPos+',top='+topPos+',scrollbars=yes');
		return false;
	}
	else{
		var href=target;
		var height = (screen.height - 100);
		
		var topPos = ((screen.height / 2) - ( height / 2));
		var leftPos = (screen.width / 2) - 346;
		window.open(href, 'ClientOpinions', 'width=693,height=' + height + ',left='+leftPos+',top='+topPos+',scrollbars=yes');
		return false;
	}
}

function trackBrainShark(href){
	pageTracker._trackPageview("/link_tracking/" + href.replace(/https\:\/\/|http\:\/\//g, "")); 
	window.open(href,"_blank");
}

function MM_openBrWindow(theURL,winName) { //v2.0
	var width=490;
	var height=495;
	var topPos = ((screen.height / 2) - ( height / 2));
	var leftPos = (screen.width / 2) - (width /2);
	window.open(theURL,'ClientOpinions','resizable=no,width='+width+',height=' + height + ',left='+leftPos+',top='+topPos+',scrollbar=no,maximize=no,dialog=yes');
}


