
var ht = 0;
var wt = 0;

function windowSize(){

var pBrowser = navigator.appName;
var pVersion = parseFloat(navigator.appVersion); 
var pPlatform = navigator.userAgent;

if (pPlatform.indexOf("Windows NT 5.0") != -1){
wt = 450;
ht = 425;
}else if(pPlatform.indexOf("Windows NT 5.1") != -1){
wt = 450;
ht = 425;
}else if (pPlatform.indexOf("Mac_PowerPC") != -1){
wt = 450;
ht = 425;
}else{
wt = 450;
ht = 425;
}

}


function ampReplace(strValue){
var re = new RegExp('&', 'gi');
var newstr = strValue.replace(re, '*');

return newstr;
}

function emWinPop(url, swt, sht){
var sUrl = "https://secure.lockheedfcu.org/email_link/email_link.asp?url=" + url;
window.open(sUrl, 'email_link', 'menubar=no,scrollbars=no,width=' + wt + ',height=' + ht + ',location=no,toolbar=no,statusbar=no');
}


function myUrl(){
//var sUrl = document.URL;
//document.write(document.URL);
var sUrl = ampReplace(document.URL);
return sUrl;
}

function createLink(text, image){
windowSize();
var url = myUrl();

if(text == ""){
text = "Email a Friend"
}

if(image == 'false'){
document.write('<a href="javascript:emWinPop(\''+ url +'\', \'' + wt + '\',\'' + ht + '\');" class="tree3navalt">'+ text + '</a>');
}else{
document.write('<a href="javascript:emWinPop(\''+ url +'\', \'' + wt + '\',\'' + ht + '\');"><img src="/images/navigation/email.gif" border="0"></a>');
}

}


function bookmarkMe(text, image){
var who = document.title;
var bVer = navigator.appName;
var bNum = parseInt(navigator.appVersion);
var url = document.URL;


  if ((bVer == "Microsoft Internet Explorer") && (bNum >= 4)) {
  
  	 if(image != ""){
  	 document.write("<a href=\"javascript:window.external.AddFavorite('" + url + "', '" + who + "');");
  	 document.write('"><img src="/images/navigation/bookmark.gif" height="15" width="15" border="0" /></a>');
  	 
  	 }
  	 else
  	 {
  	 document.write("<a class=\"tree3navalt\" href=\"javascript:window.external.AddFavorite('" + url + "', '" + who + "');");
  	 document.write('">' + text + '</a>');
  	 }
  }
}



function GetParam(name)
{
  var start=location.search.indexOf("?"+name+"=");
  //if (start<0) start=location.search.indexOf("&"+name+"=");
  if (start<0) return '';
  start += name.length+2;
  var end = -1; //location.search.indexOf("&",start)-1;
  if (end<0) end = location.search.length;
  var result=location.search.substring(start,end);
  var result='';
  for(var i=start;i<=end;i++) {
    var c=location.search.charAt(i);
    result=result+(c=='+'?' ':c);
  }
  return unescape(result);
}



function printArticle(type)
{
var addurl = "print";
var url = GetParam("url");

  if(url != "")
  {
  addurl = "print/?url=" + url;
  }
	
	if(type == "image")
	{
	document.write('<a href="' + addurl + '"><img src="/images/navigation/printer.gif" width="15" height="15" border="0" /></a>');
	}
	
	if(type == "text")
	{
	document.write('<a href="' + addurl + '" class="tree3navalt">Print this page</a>');
	}
	
		if(type == "sptext")
	{
	document.write('<a href="' + addurl + '" class="tree3navalt">Imprima esta página</a>');
	}
	
}


function feedback(){
var url = document.URL
var title = document.title
document.write('<img src="/images/spacer.gif" height="10" width="5" /><A class="footer" Href="mailto:ecom@lockheedfcu.org?subject=Feedback from www.lockheedfcu.org&body=Feedback on page titled: ' + title + '\n located at: ' + url + '">Feedback</a>\n');
}

 var cookies = new Object();

function extractFBCookie()
{		

  var name, value;
  var beginning, middle, end;
  
    for(name in cookies)
    {
		cookies = new Object();
  	}
		
		beginning = 0;
		
		while(beginning < document.cookie.length)
		{
		middle = document.cookie.indexOf("=", beginning);
		
		end = document.cookie.indexOf(";", beginning);
		
		if(end == -1)
		{
		end = document.cookie.length;
		}
		
		if( (middle > end) || (middle == -1) )
				{
				
				name = document.cookie.substring(beginning, end);
				value = "";
				
				}
		else
				{
				name = document.cookie.substring(beginning, middle);
				value = document.cookie.substring(middle+1, end);
				
				}	
		cookies[name] = unescape(value);
		
		beginning = end + 2;
		
		}

}

function checkIfInternal(){
extractFBCookie();

  if(cookies["user"] == "internal")
  {
	feedback();
	}
}