<!--
var newWin;
function ShowWin(NewURL, NewPage, Features)
{	
	if(Features=="full")
	{
		newWin = window.open(NewURL);
	}
	else
	{
		Features=Features + ",left=200,top=50";
		newWin = window.open(NewURL, "NewPage", Features);
	}
	newWin.focus();
	return false;	
}

function window_onunload()
{	
	if (typeof(newWin)!= "undefined")
	{
		if (newWin.closed == false)
		{
			newWin.close();
		}
	}
}

function CheckLogin()
{	//here we check login cookie for pages that require logon
	var blnLogin = getCookieValue("ValidLogin");
     
	if (blnLogin == "True")
	{
		return true;
	}	
	else
	{	
		alert("Please logon at the SCORE homepage to view the Members Section");
		
		return false;		
	}
}

function ShowMemberPage(NewURL)
{
	//here we check for login, if logged in display member page redirect to membership.asp, else display logon.asp
	//use the checklogin function

	if (CheckLogin()) //logon true so display membership.asp
	{	
		if (typeof(newWin)!= "undefined")   //check window status
		{	
			if(newWin.closed == false)
			{	
				newWin.close();
			}
		}

		newWin = window.open("membership.asp", "PictZoom");
		newWin.focus();
		return false;
	}
	else  //logon false, so display logon.asp
	{
		if (typeof(newWin)!= "undefined")   //check window status
		{	
			if(newWin.closed == false)
			{	
				newWin.close();
			}
		}

		newWin = window.open("logon.asp", "PictZoom");
		newWin.focus();
		
		return false;
	}

}


function getCookieValue(cookieName)
{
	var cookieValue = document.cookie;
	var cookieStartAt = cookieValue.indexOf(" " + cookieName + "=");
    if (cookieStartAt == -1)
	{
		cookieStartAt = cookieValue.indexOf(cookieName + "=");
	}
	if (cookieStartAt == -1)
	{
		cookieValue = null;
	}
	else
	{
		cookieStartAt = cookieValue.indexOf("=", cookieStartAt) + 1;
		var cookieEndAt = cookieValue.indexOf(";", cookieStartAt);
		if (cookieEndAt == -1)
		{
			cookieEndAt = cookieValue.length;
		}
		cookieValue = unescape(cookieValue.substring(cookieStartAt, cookieEndAt));
	}
	return cookieValue;
}

//set array of descriptions for use with div and site menu, display with showdescription function.  Use in future	
var descriptions = new Array();
descriptions[0] = "<P>Infomation on site contents!</P>";
descriptions[1] = "<P></P>";
descriptions[2] = "<P></P>";
descriptions[3] = "<P></P>";
descriptions[4] = "<P></P>";
descriptions[5] = "<P></P>";
descriptions[6] = "<P></P>";
descriptions[7] = "<P></P>";
descriptions[8] = "<P></P>";
descriptions[9] = "<P></P>";
descriptions[10] = "<P></P>";
descriptions[11] = "<P></P>";
descriptions[12] = "<P></P>";
descriptions[13] = "<P></P>";
descriptions[14] = "<P></P>";

//Function to display the description, call on mouseover event
//var winObj = window.parent.fraMain;
//var nnWinObj = window.parent.fraMain.document;
var newText;
var newDiv;
var divStyle;


function showDescription(descriptionIndex,e)
{		

        if (document.all)  //code for IE
        
        {		
                winObj.DescriptionDiv.style.visibility = "visible";
                winObj.DescriptionDiv.style.top = parseInt(e.screenY)-150;

                winObj.DescriptionDiv.innerHTML = descriptions[descriptionIndex];
        }
        else if (document.layers)  //code for NN4
        {		
                winObj.document.DescriptionDiv.visibility = "visible";
                winObj.document.DescriptionDiv.top = parseInt(e.screenY) -475;
                winObj.document.DescriptionDiv.document.open();
                winObj.document.DescriptionDiv.document.write("<DIV class='DescriptionDivStyle'>");
                winObj.document.DescriptionDiv.document.write(descriptions[descriptionIndex]);
                winObj.document.DescriptionDiv.document.write("</DIV>");
                winObj.document.DescriptionDiv.document.close();
         }
         else  //code for NN6

         {		
         	newDiv = nnWinObj.createElement("DIV");	
         	newText = nnWinObj.createTextNode(descriptions[descriptionIndex+15]);
         	newDiv.appendChild(newText);
         	newDiv.style.top=(parseInt(e.screenY)-120) + "px";
         	nnWinObj.body.appendChild(newDiv);	
         }
}

//clears the description display by hiding the div.  called on mouseout events
function clearDescription()
{
        if (document.all)
        {
                winObj.DescriptionDiv.style.visibility = "hidden";
        }
        else if (document.layers)
        {		
                winObj.document.DescriptionDiv.visibility = "hidden";
        }
         else  //code for NN6
         {

         			nnWinObj.body.removeChild(newDiv);
				  
         }
        
}
//-->
