function ViewAnswer1(mesid)
{
	var lngResponseType = 0;
	var TOPV = "YES";	//add to count for FAQs report
	var CCT = "YES";	//do not show internal note
	var strUrl = "http://www.faqhome.com/Home/Hybrid/show.asp" +
				"?Project=6630176" +
				"&MesId=" + mesid +
				"&CCT=" + CCT +
				"&TOP=" + TOPV ;

	var newWindow =  'ViewAnswerWindow' + Math.round(Math.random()*100000).toString(10);
	document.AquaQuestion1.action = strUrl;
	document.AquaQuestion1.method='post';
	document.AquaQuestion1.target = newWindow;
	viewAnswerWindow = window.open( '', newWindow, 'resizable,scrollbars=1,dependent, menubar=0,width=630px,height=540px,top=0px' );
	viewAnswerWindow.focus();
	document.AquaQuestion1.submit();
}

/* Browser detect */
var BrowserDetect = {
            init: function () {
                this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
                this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
                this.OS = this.searchString(this.dataOS) || "an unknown OS";
            },
            searchString: function (data) {
                for (var i = 0; i < data.length; i++) {
                    var dataString = data[i].string;
                    var dataProp = data[i].prop;
                    this.versionSearchString = data[i].versionSearch || data[i].identity;
                    if (dataString) {
                        if (dataString.indexOf(data[i].subString) != -1)
                            return data[i].identity;
                    }
                    else if (dataProp)
                        return data[i].identity;
                }
            },
            searchVersion: function (dataString) {
                var index = dataString.indexOf(this.versionSearchString);
                if (index == -1) return;
                return parseFloat(dataString.substring(index + this.versionSearchString.length + 1));
            },
            dataBrowser: [
		                {
		                    string: navigator.userAgent,
		                    subString: "Chrome",
		                    identity: "Chrome"
		                },
		                { string: navigator.userAgent,
		                    subString: "OmniWeb",
		                    versionSearch: "OmniWeb/",
		                    identity: "OmniWeb"
		                },
		                {
		                    string: navigator.vendor,
		                    subString: "Apple",
		                    identity: "Safari",
		                    versionSearch: "Version"
		                },
		                {
		                    prop: window.opera,
		                    identity: "Opera"
		                },
		                {
		                    string: navigator.vendor,
		                    subString: "iCab",
		                    identity: "iCab"
		                },
		                {
		                    string: navigator.vendor,
		                    subString: "KDE",
		                    identity: "Konqueror"
		                },
		                {
		                    string: navigator.userAgent,
		                    subString: "Firefox",
		                    identity: "Firefox"
		                },
		                {
		                    string: navigator.vendor,
		                    subString: "Camino",
		                    identity: "Camino"
		                },
		                {		// for newer Netscapes (6+)
		                    string: navigator.userAgent,
		                    subString: "Netscape",
		                    identity: "Netscape"
		                },
		                {
		                    string: navigator.userAgent,
		                    subString: "MSIE",
		                    identity: "Explorer",
		                    versionSearch: "MSIE"
		                },
		                {
		                    string: navigator.userAgent,
		                    subString: "Gecko",
		                    identity: "Mozilla",
		                    versionSearch: "rv"
		                },
		                { 		// for older Netscapes (4-)
		                    string: navigator.userAgent,
		                    subString: "Mozilla",
		                    identity: "Netscape",
		                    versionSearch: "Mozilla"
		                }
	                ],
            dataOS: [
		                {
		                    string: navigator.platform,
		                    subString: "Win",
		                    identity: "Windows"
		                },
		                {
		                    string: navigator.platform,
		                    subString: "Mac",
		                    identity: "Mac"
		                },
		                {
		                    string: navigator.userAgent,
		                    subString: "iPhone",
		                    identity: "iPhone/iPod"
		                },
		                {
		                    string: navigator.platform,
		                    subString: "Linux",
		                    identity: "Linux"
		                }
	                ]

        };
        BrowserDetect.init();
/* End of browser detect*/

var winW, winH;

function getWindowSize()
{
	if (document.body && document.body.offsetWidth) {
		winW = document.body.offsetWidth;
		winH = document.body.offsetHeight;
	}
	if (document.compatMode=='CSS1Compat' &&
		document.documentElement &&
		document.documentElement.offsetWidth ) {
			winW = document.documentElement.offsetWidth;
			winH = document.documentElement.offsetHeight;
	}
	if (window.innerWidth && window.innerHeight) {
		winW = window.innerWidth;
		winH = window.innerHeight;
	}
}

/* Print friendly section */
function printThisPage() 
{ 
	getWindowSize();
	var w=941;
	var h=800;
	var l=2;
	var t=2;
	l=(winW-w)/2;
	t=(winH-h)/2;
	var sOption="resizable=no,toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width="+ w  +",height="+ h +",left="+ l +",top="+ t +""; 			   
	var winprint=window.open(WebsiteURL + "print.aspx","Print",sOption); 			 
	winprint.focus();
	
}

function getPrintContent()
{     
	var PrintDiv =  document.getElementById('divPrintContent');
	var ContentDiv =  window.opener.document.getElementById('divContainer');
	//var newDiv = ContentDiv.cloneNode(true);
	//var ContentDiv2 =  window.opener.document.getElementById('content2');
	var Parent_Title =  window.opener.document.title;
	document.title=Parent_Title;
	
	var newDiv;
	if (BrowserDetect.browser == "Explorer")
	{
		newDiv = document.createElement('div');
		newDiv.innerHTML = ContentDiv.innerHTML;
	}
	else
	{
		newDiv = ContentDiv.cloneNode(true);
	}
	
	var headerContent = newDiv.innerHTML.substring(newDiv.innerHTML.indexOf('header') - 9, newDiv.innerHTML.indexOf('utility') - 18);
	newDiv.innerHTML = newDiv.innerHTML.replace(headerContent, "<div id='header'><div style='position: absolute;top: 20px;left: 23px;'><img src='/images/Spring/logo-enterpriseone.jpg'/></div></div>");
	
	//to strip sitemap content
	var sitemapContent = newDiv.innerHTML.substring(newDiv.innerHTML.indexOf('bottomBanner') - 12, newDiv.innerHTML.indexOf('footer') - 12);
	newDiv.innerHTML = newDiv.innerHTML.replace(sitemapContent, "</div><div>");
	
	//var newDiv = ContentDiv.cloneNode(true);			
				//newDiv.innerHTML = ContentDiv.innerHTML;
	//alert(newDiv.innerHTML);			
	//PrintDiv.rows[0].cells.innerHTML = ContentDiv.innerHTML;
	PrintDiv.parentNode.replaceChild(newDiv, PrintDiv);
	//PrintDiv.value = ContentDiv.value;
	//PrintDiv.parentNode.replaceChild(ContentDiv, PrintDiv);
	
	
	// if(ContentDiv2){
		// PrintDiv.innerHTML = ContentDiv.innerHTML + ContentDiv2.innerHTML;
	// } else{

		// PrintDiv.innerHTML = ContentDiv.innerHTML;  
        // }
	var ai=0;
	for(ai=0;ai<document.getElementsByTagName('a').length;ai++)
	{
		if ((document.getElementsByTagName('a')[ai].id!='hyperlinkPrint')&&(document.getElementsByTagName('a')[ai].id!='hyperlinkClose'))
		{
			document.getElementsByTagName('a')[ai].removeAttribute("href");           
		}
	}
}

/*end of print friendly section */

/* Industry Tree View  */
function toggle(id, iconId) {
	//var ele1 = document.getElementById("indtabTreeViewContent");
	var ele1 = document.getElementById(id);
	//var img_1 = document.getElementById("indtabTreeView_Icon");
	var imgName = document.getElementById(iconId);
	if(ele1.style.display == "none") {
		ele1.style.display = "block";
		imgName.src="~/media/Images/Site Template Media/misc/minusimg.ashx"
	}
	else {
		ele1.style.display = "none";
		imgName.src="~/media/Images/Site Template Media/misc/plusimg.jpg"
	}
}
/* End of Industry Tree View */

//homepage accordion
var bgAccordionWidth = 301;
var thumbAccordionWidth = 146;
function AccordionmOver1(){
	document.getElementById('planningBgImage').style.display = "none";
	document.getElementById('startingBgImage').style.display = "block";
	document.getElementById('growingBgImage').style.display = "block";

	document.getElementById('swapStarting').src = "/images/Starting.jpg";

	document.getElementById('planningAccContent').style.display = "block";
	document.getElementById('startingAccContent').style.display = "none";
	document.getElementById('growingAccContent').style.display = "none";

	document.getElementById('planningAccordion').style.width = bgAccordionWidth;
	document.getElementById('startingAccordion').style.width = thumbAccordionWidth;
	document.getElementById('growingAccordion').style.width = thumbAccordionWidth;
}
function AccordionmOver2(){
	document.getElementById('planningBgImage').style.display = "block";
	document.getElementById('startingBgImage').style.display = "none";
	document.getElementById('growingBgImage').style.display = "block";

	document.getElementById('planningAccContent').style.display = "none";
	document.getElementById('startingAccContent').style.display = "block";
	document.getElementById('growingAccContent').style.display = "none";

	document.getElementById('planningAccordion').style.width = thumbAccordionWidth;
	document.getElementById('startingAccordion').style.width = bgAccordionWidth;
	document.getElementById('growingAccordion').style.width = thumbAccordionWidth;
	
}
function AccordionmOver3(){
	document.getElementById('planningBgImage').style.display = "block";
	document.getElementById('startingBgImage').style.display = "block";
	document.getElementById('growingBgImage').style.display = "none";

	document.getElementById('swapStarting').src = "/images/Starting-right.jpg";

	document.getElementById('planningAccContent').style.display = "none";
	document.getElementById('startingAccContent').style.display = "none";
	document.getElementById('growingAccContent').style.display = "block";

	document.getElementById('planningAccordion').style.width = thumbAccordionWidth;
	document.getElementById('startingAccordion').style.width = thumbAccordionWidth;
	document.getElementById('growingAccordion').style.width = bgAccordionWidth;
}
//end of homepage accordion

//For Grouping in Industry Tab
function showTabGroupContent(id) {
	var obj = document.getElementById("div_group_" + id);
	var lnk = document.getElementById("lnk_" + id);

	if (obj.style.display == "block") {
		obj.style.display = "none";
		lnk.innerHTML = "+";
	}
	else {
		obj.style.display = "block";
		lnk.innerHTML = "-";
	}
}

/* Custom Tabber Area */

function showRightPanel(pShowId,pHideId)
{
	if(pShowId != "")
	{
		var showContainerId = "div_" + pShowId;
		var showlnkID = "lnk_" + pShowId;
		document.getElementById(showContainerId).style.display = 'block';
		document.getElementById(showlnkID).className = "active_tab";
	}
	
	if(pHideId != "")
	{
		var hideContainerId = "div_" + pHideId;
		var hidelnkID = "lnk_" + pHideId;
		document.getElementById(hideContainerId).style.display = 'none';
		document.getElementById(hidelnkID).className = "nonactive_tab";
	}
}

function showHomeLeftPanel(pShowId,pHideId)
{
	if(pShowId != "")
	{
		var showContainerId = "div_" + pShowId;
		var showlnkID = "lnk_" + pShowId;
		document.getElementById(showContainerId).style.display = 'block';
		document.getElementById(showlnkID).className = "active_tab";
	}
	
	if(pHideId != "")
	{
		var hideContainerId = "div_" + pHideId;
		var hidelnkID = "lnk_" + pHideId;
		document.getElementById(hideContainerId).style.display = 'none';
		document.getElementById(hidelnkID).className = "nonactive_tab";
	}
}
function showLeftPanel(pShowId,pTotalTabs){
	var selectedTab = pShowId;
	for(var i=1;i<=pTotalTabs;i++){
		var tabId = "div_lefttab_"+i;
		var pLink = "lnk_lefttab_"+i;
		if(!(!(document.getElementById(tabId))))
		{		
			if(selectedTab == i){
				document.getElementById(tabId).style.display = 'block';
				document.getElementById(pLink).className = "active_tab";
			}
			else{
				document.getElementById(tabId).style.display = 'none';
				document.getElementById(pLink).className = "nonactive_tab";
			}
		}
	}
}
function showIndustryTab(pShowId,pTotalTabs){
	var selectedTab = pShowId;
	for(var i=1;i<=pTotalTabs;i++){
		var tabId = "div_lefttab_"+i;
		var pLink = "lnk_lefttab_"+i;
		if(selectedTab == i){
			document.getElementById(tabId).style.display = 'block';
			document.getElementById(pLink).className = "active_tab";
			document.getElementById(pLink).style.color="#1d3960";
			document.getElementById(pLink).style.background="#fff";
		}
		else{
			document.getElementById(tabId).style.display = 'none';
			document.getElementById(pLink).className = "nonactive_tab";
			document.getElementById(pLink).style.color="#fff";
			document.getElementById(pLink).style.background="#2e70ad";
		}
	}
}

function showHideSummary(pSumaryId,pFullStoryId,pHideId){
			document.getElementById(pFullStoryId).style.display = 'block';
			document.getElementById(pSumaryId).style.display = 'none';
			var ele1 = document.getElementById(pHideId)
			if(ele1.style.display == "block") {
				ele1.style.display = "none";
			}
			else {
				ele1.style.display = "block";
			}
		}
/* End of Custom Tabber Area */
