// hack to deal with image rollover flicker in IE
try {
  document.execCommand('BackgroundImageCache', false, true);
} catch(e) {}

// keyword link
function keyDef(tempStr) {
	Telligent_Modal.Open('/themes/noc/keywordDefinition.aspx?k=' + tempStr + '&hwid=hw136623', 700, 350);
}
function keyDefClose(tempStr) {
	window.parent.Telligent_Modal.Close(false);
}
//YouTube thumbnail string.
//This URL and file name could be changed by youtube at anytime...
var youTubeImgURL = "http://i1.ytimg.com/vi/";
var youTubeImgFileName = "/default.jpg";
function getYouTubeThumbNail(str) {
	return "<img src='" + getYouTubePath(str) + "' Width='131' Height='94' border='0' />";
}
function getYouTubeListThumbNail(str) {
	return "<img src='" + getYouTubePath(str) + "' Width='48' Height='48' border='0' />";
}
function getYouTubePath(str) {
	return youTubeImgURL + str.replace(/.+?v=/g, "") + youTubeImgFileName;
}
var PopUpWindow;

function Popup(theURL, w, h) {
	if (typeof w == 'undefined') {
		w = 500;
	}
	
	if (typeof h == 'undefined') {
		h = 500;
	}

	if(PopUpWindow == null || PopUpWindow.closed) {
		PopUpWindow = window.open(theURL, "PopUpWindow", "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,width=" + w + ",height=" + h + ",top=50,left=200");
	} else {
		PopUpWindow.close()
		PopUpWindow = window.open(theURL, "PopUpWindow", "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,width=" + w + ",height=" + h + ",top=50,left=200");
	}
}