var toolTipDivName = "toolTipDiv";

function createToolTipDiv() {
	var div = document.createElement("div");

	div.id = toolTipDivName;

	//div.style.width = "420px";
	div.style.borderTop = "1px solid #001f3d";
	div.style.borderBottom = "1px solid #001f3d";
	div.style.borderLeft = "1px solid #001f3d";
	div.style.borderRight = "1px solid #001f3d";
	div.style.backgroundColor = "#ffffff";
	div.style.paddingTop = "8px";
	div.style.paddingBottom = "8px";
	div.style.paddingLeft = "8px";
	div.style.paddingRight = "8px";
	div.style.position = "absolute";
	div.style.visibility = "hidden";
	document.body.appendChild(div);

	return div;
}

function getToolTipDiv(styleClass) {
	var div = document.getElementById(toolTipDivName);

	if (div == null)
		div = createToolTipDiv();

	div.className = styleClass;

	return div;
}

function changeToolTipContent(text) {
	var tooltip = getToolTipDiv("");

	tooltip.innerHTML = "<div style = 'background-color: #dceaee; padding: 6px 8px 6px 8px;'><p id='tipp' align='justify' style='margin-top:0px;margin-bottom:0px;'>" + text + "</p></div>";
}

function showToolTip(event, styleClass) {
	var tooltip = getToolTipDiv(styleClass);

	var left = event.clientX + 20;
	if (left + 420 > document.body.clientWidth)
		left -= left + 420 - document.body.clientWidth;

	tooltip.style.left = left + "px";
	scrollY = 0;

	if (typeof(window.pageYOffset) == "number")
		scrollY = window.pageYOffset;
	else if (document.body && document.body.scrollTop)
		scrollY = document.body.scrollTop;
	else if (document.documentElement && document.documentElement.scrollTop)
	scrollY = document.documentElement.scrollTop;

	tooltip.style.top = scrollY + event.clientY - 20 + "px";
	tooltip.style.visibility = "visible";
}

function hideToolTip() {
	var tooltip = getToolTipDiv("");
	tooltip.style.visibility = "hidden";
}

(function(){var e=null,a=window,q=a.googleSearchResizeIframe||a.googleSearchPath&&a.googleSearchPath=="/cse"&&typeof a.googleSearchResizeIframe=="undefined",o,n,k;function r(c,b,i,l){for(var f={},g=c.split(i),d=0;d<g.length;d++){var h=g[d],m=h.indexOf(b);if(m>0){var j=h.substring(0,m);j=l?j.toUpperCase():j.toLowerCase();var t=h.substring(m+1,h.length);f[j]=t}}return f}function u(){var c=document.location.search;if(c.length<1)return"";c=c.substring(1,c.length);var b=r(c,"=","&",false);if(a.googleSearchQueryString!=
"q"&&b[a.googleSearchQueryString]){b.q=b[a.googleSearchQueryString];delete b[a.googleSearchQueryString]}if(b.cof){var i=r(decodeURIComponent(b.cof),":",";",true),l=i.FORID;if(l)o=parseInt(l,10)}var f=document.getElementById(a.googleSearchFormName);if(f){if(f.q&&b.q&&(!b.ie||b.ie.toLowerCase()=="utf-8"))f.q.value=decodeURIComponent(b.q.replace(/\+/g," "));if(f.sitesearch)for(var g=0;g<f.sitesearch.length;g++)f.sitesearch[g].checked=b.sitesearch==e&&f.sitesearch[g].value==""?true:f.sitesearch[g].value==
b.sitesearch?true:false}var d="";for(var h in b)d+="&"+h+"="+b[h];return d.substring(1,d.length)}function p(c,b){return b?"&"+c+"="+encodeURIComponent(b):""}function s(c,b){return c?Math.max(c,b):b}function v(){var c="http://";c+=a.googleSearchDomain?a.googleSearchDomain:"www.google.com";c+=a.googleSearchPath?a.googleSearchPath:"/custom";c+="?";if(a.googleSearchQueryString)a.googleSearchQueryString=a.googleSearchQueryString.toLowerCase();c+=u();c+=p("ad","w"+n);c+=p("num",k);c+=p("adtest",a.googleAdtest);
if(q){var b=a.location.href,i=b.indexOf("#");if(i!=-1)b=b.substring(0,i);c+=p("rurl",b)}return c}function w(){(n=a.googleSearchNumAds)||(n=9);k=(k=a.googleNumSearchResults)?Math.min(k,20):10;var c={};c[9]=795;c[10]=795;c[11]=500;var b={};b[9]=300+90*k;b[10]=300+50*Math.min(n,4)+90*k;b[11]=300+50*n+90*k;var i=v();if(!a.googleSearchFrameborder)a.googleSearchFrameborder="0";var l=document.getElementById(a.googleSearchIframeName);if(l&&c[o]){var f=s(a.googleSearchFrameWidth,c[o]),g=s(a.googleSearchFrameHeight,
b[o]),d=document.createElement("iframe"),h={name:"googleSearchFrame",src:i,frameBorder:a.googleSearchFrameborder,width:550,height:g,marginWidth:"0",marginHeight:"0",hspace:"0",vspace:"0",allowTransparency:"true",scrolling:"no"};for(var m in h)d.setAttribute(m,h[m]);l.appendChild(d);d.attachEvent?d.attachEvent("onload",function(){window.scrollTo(0,0)}):d.addEventListener("load",function(){window.scrollTo(0,0)},false);q&&a.setInterval(function(){if(a.location.hash&&a.location.hash!="#"){var j=a.location.hash.substring(1)+
"px";if(d.height!=j&&j!="0px")d.height=j}},10)}a.googleSearchIframeName=e;a.googleSearchFormName=e;a.googleSearchResizeIframe=e;a.googleSearchQueryString=e;a.googleSearchDomain=e;a.googleSearchPath=e;a.googleSearchFrameborder=e;a.googleSearchFrameWidth=e;a.googleSearchFrameHeight=e;a.googleSearchNumAds=e;a.googleNumSearchResults=e;a.googleAdtest=e}w()})();

