﻿// JScript File

function CheckForFlash(pValue,eSrc,Image,wid,hei,elementID,bgValue)
{
        if (navigator.appName=="Netscape") {   
            var FlashStr 
            FlashStr = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,47,0' id='ParisOFlash'>" +
            "<param name='movie' value='"+ pValue +"' />" +
            "<param name='quality' value='high' />" +
            "<param NAME='wmode' VALUE='transparent' />" +
	    "<param name='bgcolor' value='"+ bgValue +"' />" +
            "<EMBED src='"+ eSrc +"' quality='high' bgcolor='"+ bgValue +"' WIDTH='"+ wid +"' HEIGHT='"+ hei +"'" +
            " NAME='HomeMov' ALIGN='' TYPE='application/x-shockwave-flash'" +
            " PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'>" +
            "</EMBED>" +
            "</object>";
            var FlashMode = CheckFlashMoz();
            if (FlashMode != 1) {
                document.getElementById(elementID).innerHTML = FlashStr
            }
            else {
                document.getElementById(elementID).innerHTML = "<img src='"+ Image +"' alt=''>"
            }
        }

}

function CheckFlashMoz()
{
    var flashinstalled = 0;
    var flashversion = 0;
    MSDetect = "false";
    if (navigator.plugins && navigator.plugins.length) {
        x = navigator.plugins["Shockwave Flash"];
        if (x) {
            flashinstalled = 2;
            if (x.description) {
	            y = x.description;
	            flashversion = y.charAt(y.indexOf('.')-1);
            }
        }
        else
            flashinstalled = 1;
            if (navigator.plugins["Flash"]) {
                flashinstalled = 2;
                flashversion = 2;
            }
        }
    else if (navigator.mimeTypes && navigator.mimeTypes.length) {
        x = navigator.mimeTypes['application/x-shockwave-flash']; 
        if (x && x.enabledPlugin)
            flashinstalled = 2;
        else
            flashinstalled = 1;
    }
    else
        MSDetect = "true";
        return flashinstalled
}


        function ShowHide(inform)	
        {
            if (inform.value == "101622" || inform.value == "101630" || inform.value == "101608" || inform.value == "101587")
            {
                document.getElementById("divProf").style.visibility="visible";
                document.getElementById("divProf").style.display="block";
                document.getElementById("StudentDiv").style.visibility="hidden";
                document.getElementById("StudentDiv").style.display="none";
            }
            else if (inform.value == "101583")
            {
                document.getElementById("StudentDiv").style.visibility="visible";
                document.getElementById("StudentDiv").style.display="block";
                document.getElementById("divProf").style.visibility="hidden";
	            document.getElementById("divProf").style.display="none";
            }
            else
            {
                document.getElementById("divProf").style.visibility="hidden";
                document.getElementById("divProf").style.display="none";
                document.getElementById("StudentDiv").style.visibility= "hidden";
                document.getElementById("StudentDiv").style.display="none";
		reqProf();
            }
        }

        // Step 1 to Step 2
        function Step2()
        {
        	var chk;
		timevalidate();
            Page_ClientValidate();
            for (i = 0; i < 19; i++) {
		if (!Page_Validators[i].isvalid) {
                    Page_IsValid = false;
                    return;
                }
		
            }
            Page_IsValid = true;
            if(Page_IsValid == true) {
                createQueryString();
	            if (window.showModalDialog) {
            	    document.getElementById("Step1").style.visibility="hidden";
                    document.getElementById("Step1").style.display="none";
                    document.getElementById("Step2").style.visibility="visible";
                    document.getElementById("Step2").style.display="inline";
                    document.getElementById("innerContainer").className = "inCont"
                 }
               }
        }

        function Step1()
        {
    	    document.getElementById("Step1").style.visibility="visible";
            document.getElementById("Step1").style.display="inline";
            document.getElementById("Step2").style.visibility="hidden";
            document.getElementById("Step2").style.display="none";
	    document.getElementById("innerContainer").className = "innerContainer"
        }

	function reqProf()
	{
		if(!Page_Validators[20].isvalid) {
		  Page_Validators[20].style.color="red";}
	}
