﻿//SETS THE REQUIRED BOTTOM PADDING BASED ON THE SCREEN RESOLUTION. THIS IS REQUIRED TO ELIMINATE GREEN SPACE BELOW THE CONTENT AREA.
//function SetContentHeight(){
//	// browser sniffer
//	var NN, IE, dynNN, dynIE
//	var agent = navigator.appName + navigator.appVersion;

//	NN = ( (agent.indexOf("Netscape") > -1 ) ? 1 : 0);
//	IE = ( (agent.indexOf("Explorer" )> -1 || agent.indexOf("MSIE") > -1 ) ? 1 : 0);

//	if (parseInt(navigator.appVersion) >= 4){
//		if (navigator.appName == "Netscape"){
//			dynNN = true;
//			}
//		else{
//			dynIE = true;
//			}
//		}

//	var ScreenHeight;
//	var NavHeight;

//	// If browsing with IE, set the height of the nav area to the available height in the browser window.
//  if (dynIE){
////		ScreenHeight = document.body.clientHeight;
//        ScreenHeight =(document.compatMode=="CSS1Compat")?document.documentElement.clientHeight : document.body.clientHeight;
//		NavHeight = parseInt(mainHeader.height);
//		leftNav.height = ScreenHeight - (NavHeight + 2);
//		}
//}

////////////////////////////////////////////////////////////////////////////
// Function : linkToPrimary
// Comments : this function is the same as the Site Studio function "link" except 
// 						that it takes a dDocName param as well.  This forces Site Studio to return
//						the primary page. 
/////////////////////////////////////////////////////////////////////////////
//function linkToPrimary(dDocName,nodeId)
//{
//	var newUrl = "";
//	newUrl += g_httpCgiUrl;
//	newUrl += "ssDocName=" + dDocName;
//	newUrl += "&nodeId=" + nodeId;

//	var currentUrl = "" + window.location;

//	// Continue propagation of the "SSContributor" parameter
//	if( SSContributor )
//	{
//		var paramName = "SSContributor=";
//		var pos = currentUrl.indexOf( paramName );
//		if( pos != -1 )
//		{
//			var subStr = currentUrl.substring( pos+paramName.length, pos+paramName.length+1 );
//			if( isTrue( subStr ) )
//			{
//				newUrl += "&" + paramName + "true";
//			}
//		}
//	}

//	// Continue propagation of the "previewId" parameter
//	var previewId = "previewId=";
//	var posStart = currentUrl.indexOf( previewId );
//	if( posStart != -1 )
//	{
//		var posEnd = currentUrl.indexOf("&", posStart);
//		var value = "";
//		if (posEnd == -1)
//		{
//			value = currentUrl.substring(posStart+previewId.length, currentUrl.length);
//		}
//		else
//		{
//			value = currentUrl.substring(posStart+previewId.length, posEnd);
//		}
//		newUrl += "&" + previewId + value;
//	}

//	// We now always add the node that the link is on as part of the URl also.
//	if( g_ssSourceNodeId != _U && g_ssSourceNodeId != null )
//		newUrl += "&ssSourceNodeId=" + g_ssSourceNodeId;

//	// Navigate to the new url
//	window.location = newUrl;
//}

function outsideLink(theurl)
{ window.open("http://apps." + DomainCoName + "/exitpage/default.aspx?url="+theurl);}
function outsidelink(theurl)
{ window.open("http://apps." + DomainCoName + "/exitpage/default.aspx?url="+theurl);}
function newWindow(theurl)
{ window.open(theurl);}

//function nativelink(contentId){ 
//	var newUrl = "";
//	if (isIE){
//		var oBase = document.all.tags('BASE');
//		strHref = oBase[0].href;
//		newUrl += strHref;
//	}
//	newUrl += "idcplg?IdcService=GET_FILE";
//	newUrl += "&dDocName=" + contentId;
//	newUrl += "&RevisionSelectionMethod=LatestReleased";
//	newUrl += "&Rendition=primary";
//	//newUrl += "&noSaveAs=1";
//	newUrl += "&allowInterrupt=1";
//	
//	// Navigate to the new url
//	window.location = newUrl;
//}

//function pdflink(contentId){ 
//	var newUrl = "";
//	newUrl += "http://www.finra.org/web/idcplg?IdcService=SS_GET_PAGE&";
//	newUrl += "ssDocName=" + contentId;
//	// Navigate to the new url	
//	window.open(newUrl);
//}

//function email(mailID, displayName){ 
////	var newUrl = "";
////	newUrl += "http://apps." + DomainCoName + "/EmailMask/EmailMask.aspx?";
////	newUrl += "&id=" + mailID;
////	newUrl += "&displayName=" + displayName;
////	window.open(newUrl,'mail','menubar=0,location=0,titlebar=0,status=0,toolbar=0,resizable=1,width=600,height=500');
//location.href="mailto:webmaster@finra.org";
//}

//function nodelink(node)
//{
//    window.open("http://www.finra.org/web/idcplg?IdcService=SS_GET_PAGE&nodeId=" + node);
//}

//function link(docname)
//{
//    window.open("http://www.finra.org/web/idcplg?IdcService=SS_GET_PAGE&ssDocName=" + docname);
//}

//function fnTrapKD(btn, event)
//{
//    //alert("this will never be seen");
//    if (document.all)
//    {
//    	if (event.keyCode == 13)
//    	{
//    		event.returnValue=false;
//            event.cancel = true;
//            btn.click();
//        }
//    }
//    else if (document.getElementById)
//    {
//        if (event.which == 13)
//        {
//            event.returnValue=false;
//            event.cancel = true;
//            btn.click();
//        }
//    }
//    else if(document.layers)
//    {
//        if(event.which == 13)
//        {
//            event.returnValue=false;
//            event.cancel = true;
//    	    btn.click();
//    	}
//    }
//}
