function showFlash(id,width,height,classID,movie,wmode,quality){
        if (document.getElementById(id) != null) { //If the div specified exists
                if (wmode == "") { wmode = 'transparent'; }
                if (quality == "") { quality = 'high'; }
                //Write the start of the object
                var inner = '<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" ';
                inner += ' width="'+width+'"';
                inner += ' height="'+height+'"';
                inner += ' classid="'+classID+'"';
                inner += ' wmode="'+wmode+'">';
                //Add the paramaters
                inner += ' <param name="movie" value="'+movie+'">';
                inner += ' <param name="quality" value="'+quality+'">';
                inner += ' <param name="wmode" value="'+wmode+'">';
                //Add the embed
                inner += '<embed pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"';
                inner += 'src="'+movie+'" width="'+width+'" height="'+height+'" quality="'+quality+'" wmode="'+wmode+'"></embed>';
                //Close the object
                inner += '</object>';
                //Print the object on screen in the div provided
                document.getElementById(id).innerHTML = inner;
        }
}


function fnValidateAndSubmitLink()
        {
        lstrSetFocus = "";
        lstrAlert = "";
        
        if (document.getElementById("txtName").value == "" || document.getElementById("txtName").value == "Your Name")
                {
                lstrAlert += "- Your name\n";
                if (lstrSetFocus == "") {lstrSetFocus = "txtName";}
                }
        
        var lstrEmail = document.getElementById("txtEmail").value ;
        var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

//        if (!filter.test(lstrEmail))
//                {
//                lstrAlert += "- Your email address (is not valid)\n";
//                if (lstrSetFocus == "") {lstrSetFocus = "txtEmail";}
//                }

        
                
        if (lstrAlert == "")
                {
                document.forms["frmSendLink"].action = ("sendlink.php");
                document.forms["frmSendLink"].method = ("POST");
                document.forms["frmSendLink"].submit();
                }
        else
                {
                document.getElementById(lstrSetFocus).focus();
                alert("Please complete the following information first...\n\n" + lstrAlert);
                }
        }
        
        
        
function fnValidateAndSubmitContact()
        {
        lstrSetFocus = "";
        lstrAlert = "";

        if (document.getElementById("txtContactFullname").value == "")
                {
                lstrAlert += "- Your name\n";
                if (lstrSetFocus == "") {lstrSetFocus = "txtContactFullname";}
                }

        var lstrEmail = document.getElementById("txtContactEmail").value ;
        var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

//        if (!filter.test(lstrEmail))
//                {
//                lstrAlert += "- Your email address (is not valid)\n";
//                if (lstrSetFocus == "") {lstrSetFocus = "txtContactEmail";}
//                }

        if (document.getElementById("txtContactTelephone").value == "")
                {
                lstrAlert += "- Telephone number\n";
                if (lstrSetFocus == "") {lstrSetFocus = "txtContactTelephone";}
                }

        
        if (lstrAlert == "")
                {
                document.forms["frmContact"].action = ("sendcontact.php");
                document.forms["frmContact"].method = ("POST");
                document.forms["frmContact"].submit();
                }
        else
                {
                document.getElementById(lstrSetFocus).focus();
                alert("Please complete the following information first...\n\n" + lstrAlert);
                }
        }

function fnValidateAndSubmitSignUp()
        {
        lstrSetFocus = "";
        lstrAlert = "";

        if (document.getElementById("txtContactFullname").value == "")
                {
                lstrAlert += "- Your name\n";
                if (lstrSetFocus == "") {lstrSetFocus = "txtContactFullname";}
                }

        var lstrEmail = document.getElementById("txtContactEmail").value ;
        var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

//        if (!filter.test(lstrEmail))
//                {
//                lstrAlert += "- Your email address (is not valid)\n";
//                if (lstrSetFocus == "") {lstrSetFocus = "txtContactEmail";}
//                }


        if (lstrAlert == "")
                {
                document.forms["frmSendSignUp"].action = ("sendsignup.php");
                document.forms["frmSendSignUp"].method = ("POST");
                document.forms["frmSendSignUp"].submit();
                }
        else
                {
                document.getElementById(lstrSetFocus).focus();
                alert("Please complete the following information first...\n\n" + lstrAlert);
                }
        }


sfHover = function() {
    var sfEls = document.getElementById("nav").getElementsByTagName("LI");
    for (var i=0; i<sfEls.length; i++) {
        sfEls[i].onmouseover=function() {
            this.className+=" sfhover";
        }
        sfEls[i].onmouseout=function() {
            this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
        }
    }
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

