/* Onload Handler For Elements Which Do Not Normally Support One */


var t = 0;

function initOn(el, func){
	if (!document.getElementById(el) && t <= 120){
		window.setTimeout("initOn('" + el + "'," + func + ")", 250);
		return t++;
	}
	else{
		try{
			func;
		}
		catch (e){
			return;
		}
	}
}



/* Load Offsite Links In New Window */


function redirect(){
	var d = document.links;
	for (var l = 0; l < d.length; l++){
		if (d[l].hostname != self.location.hostname && !d[l].href.match("javascript") && !d[l].href.match("googlesyndication.com")){
			d[l].target = "_blank";
		}
	}
}
window.onload = redirect;



/* Automatically Copy Field To Clipboard In IE, Autoselect It For All Others */


function copyCode(el){
	el.select();
	try{
		code = el.createTextRange();
		code.execCommand("Copy");
		if (document.all["note"]) document.all["note"].parentNode.removeChild(document.all["note"]);
		note = el.parentNode.appendChild(document.createElement("span"));
		note.id = "note";
		note.innerText = "Copied To Clipboard";
	}
	catch(e){
		el.focus();
	}
}