﻿
// Miscellaneous JS functions for use throughout the site

function hide(contact, email, emailHost, subject, cssClass)
{

    document.write("<a href=" + "mail" + "to:" + email + "@" + emailHost+ "?subject=" + escape(subject) + ">" + contact + "</a>")

//	if(cssClass != null)
//	{
//		document.write("<a href=" + "mail" + "to:" + email + "@" + emailHost+ "?subject=" + escape(subject) + " class=" + cssClass + ">" + contact + "</a>")
//	}
//	else
//	{
//		document.write("<a href=" + "mail" + "to:" + email + "@" + emailHost+ "?subject=" + escape(subject) + ">" + contact + "</a>")
//	}
}
function hide_contact(email, emailHost, subject, cssClass)
{

    document.write("<a href=" + "mail" + "to:" + email + "@" + emailHost+ "?subject=" + escape(subject) + ">" + email + "@" + emailHost + "</a>")

//	if(cssClass != null)
//	{
//		document.write("<a href=" + "mail" + "to:" + email + "@" + emailHost+ "?subject=" + escape(subject) + " class=" + cssClass + ">" + email + "@" + emailHost + "</a>")
//	}
//	else
//	{
//		document.write("<a href=" + "mail" + "to:" + email + "@" + emailHost+ "?subject=" + escape(subject) + ">" + email + "@" + emailHost + "</a>")
//	}
}

function output_table_start()
{
    document.write("<table width=\"100%\" height=\"" + find_height() + "\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">")
}


function find_height() 
{
    // This function finds the inner dimensions of a browser window
    // everything but IE uses inner properties; but they have to be
    // faked with IE
    var myWidth = 0, myHeight = 0;
    if( typeof( window.innerWidth ) == 'number' ) 
    {
        //Non-IE
        myWidth = window.innerWidth;
        myHeight = window.innerHeight;
    } 
    else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
    {
        //IE 6+ in 'standards compliant mode'
        myWidth = document.documentElement.clientWidth;
        myHeight = document.documentElement.clientHeight;
    } 
    else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
    {
        //IE 4 compatible
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
    }
    // window.alert( 'Width = ' + myWidth );
    // window.alert( 'Height = ' + myHeight );
    return myHeight;
}