﻿// Content navigation div tags

function funDisplayHideContentNav(strDivName,intAction)
	{
	var strDivNamea
	var strDivNameb
	var strOldDivNamea
	var strOldDivNamea
		
	strDivNamea = strDivName + 'a';
	strDivNameb = strDivName + 'b';
    
    if (intAction == 2)
        {

		    if (document.getElementById("ContentNavdivName").value != 'div0')
		        {
                    strOldDivNamea = document.getElementById("ContentNavdivName").value + 'a';
                    strOldDivNameb = document.getElementById("ContentNavdivName").value + 'b';
                    
                    document.getElementById("" + strOldDivNamea + "").style.display = '' ;
				    document.getElementById("" + strOldDivNameb + "").style.display = 'none' ;
		        }

	        if (document.getElementById("ContentNavdivName").value != strDivName)
	            {	        
		            document.getElementById("" + strDivNamea + "").style.display = 'none' ;	        
		            document.getElementById("" + strDivNameb + "").style.display = '' ;
		            document.getElementById("ContentNavdivName").value = strDivName;
		        }
		    else
		        {
		            document.getElementById("ContentNavdivName").value = 'div0';
		        }
		    
        }

	}	
	
function funDisplayHideBox(strTRName,strHrefName)
	{
        if (document.getElementById("" + strTRName + "").style.display == 'none')
	        {
                document.getElementById("" + strTRName + "").style.display = '' ;
                document.getElementById("" + strHrefName + "").innerHTML = '<img src="/images/box/minus.gif" alt="Collapse Box" border="0" />' ; 
            }
        else
            {
                document.getElementById("" + strTRName + "").style.display = 'none' ;  
                document.getElementById("" + strHrefName + "").innerHTML = '<img src="/images/box/plus.gif" alt="Expand Box" border="0" />' ;   
            }
	}
	

function funDisplayHideBoxFAQ(strTRName,strHrefName)
	{
        if (document.getElementById("" + strTRName + "").style.display == 'none')
	        {
                var i;
                document.getElementById("" + strTRName + "").style.display = '' ;
                document.getElementById("" + strHrefName + "").innerHTML = '<img src="/images/box/minus.gif" alt="Collapse Box" border="0" />' ; 
                self.location.hash = '#sec' + strTRName ;
            }
        else
            {
                document.getElementById("" + strTRName + "").style.display = 'none' ;  
                document.getElementById("" + strHrefName + "").innerHTML = '<img src="/images/box/plus.gif" alt="Expand Box" border="0" />' ;   
            }
	}
	
	
function funDisplayReplyBox(intTRName,strQuoteContent,intSentPostID)
    {
        
        var strTRName
        var strTRName_Quote
        var strReaderReply
        var strReaderReply_Quote
        var intMainFeedbackID
        
        strTRName = 'intTRFeedback' + intTRName ;
        strReaderReply = 'strReaderReply' + intTRName ;
        intMainFeedbackID = 'intMainFeedbackID' + intTRName ;

        if (strQuoteContent != '')
            {
                document.getElementById("strReaderReply" + intTRName + "").value = '<QUOTE>' + strQuoteContent + '</QUOTE>' ;
            }
        
        document.getElementById("" + intMainFeedbackID + "").value = intSentPostID;        
        document.getElementById("intReportFeedback" + intTRName + "").style.display = 'none' ;
        document.getElementById("" + strTRName + "").style.display = '' ;
        location.hash = '#reply';
    }
    
function funDisplayReportBox(intTRName,strSentPostContent,intSentPostID)
    {

        var strTRName
        var intReportPostID
        var strReportPostValue
        
        strTRName = 'intReportFeedback' + intTRName ;
                
        document.getElementById("" + strTRName + "").style.display = '' ;
        document.getElementById("intTRFeedback" + intTRName + "").style.display = 'none' ;
        document.getElementById("intTRFeedback" + intTRName + "_quote").style.display = 'none' ;
        
        
        document.getElementById("strReportPostValue" + intTRName + "").value = strSentPostContent;
        document.getElementById("intReportPostID" + intTRName + "").value = intSentPostID;
        
        location.hash = '#report';
        
        
    }
 
function funPopUpLegends(strPage, intHeight, intWidth)
    {
        var nLeft = (window.screen.availWidth - 400);
	    var nTop = (window.screen.availHeight - 1000);
	    window.open('/asp/elements/popups/' + strPage, '_blank', 'width=' + intWidth + ',height=' + intHeight + ',top=' + nTop + ',left=' + nLeft, true)
    }
    
function funGenericPopUp(strURL,strWidth,strHeight,strTitle)
    {
	    var nLeft = (window.screen.availWidth - 600)/2;
	    var nTop = (window.screen.availHeight - 490)/2;
	    window.open(strURL,'winPopUp','resizeable=no,width=' + strWidth + ',height=' + strHeight + ',top=' + nTop + ',left=' + nLeft,true); 
    }
    
function funNewsSearchSuggested()
    {
        if (document.getElementById("selNewsSearchOptionIGD").value != 0)
            {
                document.getElementById("nsc").value = document.getElementById("selNewsSearchOptionIGD").value ;
            }
 
    }

function funCopyThis(StrText,lblLabel)
    {
    if( window.clipboardData && clipboardData.setData ) 
        { 
            clipboardData.setData("Text", StrText);
            
            document.getElementById('1').innerHTML = "http://www.igd.com/analysis/rss/ra_rss.xml"
            
            document.getElementById(lblLabel).innerHTML = 'Link Copied to Clipboard';
        } 
    else 
        { 
            alert("Internet Explorer required"); 
        } 
}