﻿// JScript File

var slideCol = new Array(0,203,32)
var curSlide = 0
var slides
var preloadFlag = false;
var filter = false;
var promptTotal = 12;
var currentPrompt = -1;
var oldObj;
var timerID;
var speechTimer;
var showTimer;
var hideTimer;

function init() {
    try {
        getSlides();
        }
    catch(e) {}
}

var slideCol = new Array(0,203,32)
var curSlide = 0
var slides

function ShowModalInfo(modalPopupName){
    var modalPopupBehavior = $find(modalPopupName);
    alert(modalPopupBehavior)
    modalPopupBehavior.show();
}

function nextslide(){

  slides = document.getElementById("slideContainer");
  slides.style.filter = "progid:DXImageTransform.Microsoft.fade(duration=2)";
  slides.filters(0).Apply();
  slideCol[curSlide].style.display = "none"

  if (curSlide < slideCol.length -1)
    curSlide++;
  else
    curSlide = 0;

  slideCol[curSlide].style.display = "block"
  slides.filters(0).Play();
  mtimer = setTimeout("nextslide()",5000)

  }

function getSlides(){

  slides = document.getElementById("slideContainer");
  for(x=0;x<slides.children.length;x++){
    slideCol[x] = slides.children(x);
    }
  
  slideCol[0].style.display = "block"
  mtimer = setTimeout("nextslide()",5000)

  }

function onOk() {
    
}


function writeflash(url, width, height, suburl){
	
		plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
		var classidnum = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";
		var codebasenum = "http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0";
		var pluginsurl = "http://www.macromedia.com/go/getflashplayer"
		var qualitynum = "high";

		var swf_url = url;
		var swf_width = width;
		var swf_height = height;

		if ( plugin ) {
			plugin = parseInt(plugin.description.substring(plugin.description.indexOf(".")-1))>=8;
		} else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
			&& (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0)) {
			document.write('<scr'+'ipt language="VBScript"\> \n');
			document.write('on error resume next \n');
			document.write('plugin = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.9")))\n');
			document.write('<\/scr'+'ipt\>\n');
		}

		if ( plugin ) {
	
			subs = '\n<object classid=' + classidnum +' codebase=' + codebasenum + ' width=' + swf_width + ' height=' + swf_height + '>';
			subs +='<param name="movie" value="' + swf_url + '">';
			subs +='<param name="quality" value=' + qualitynum +'>';
			subs +='<embed src="' + swf_url + '" quality=' + qualitynum +' pluginspage=' + pluginsurl +' type="application/x-shockwave-flash" width=' + swf_width + ' height=' + swf_height + '></embed>';
			subs +='</object>';
			
		} else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)){
		
			 subs ='<a href="http://www.macromedia.com/go/getflashplayer" target="_blank">';
			 subs +='<img src="' + suburl + '" alt="" width="' + swf_width + '" height="' + swf_height + '" style="float:left;"></a>';

		}
		
		document.open();
		document.write(subs);
		document.close();
}



var t=0;
var time;
function move_up(div,amm) {
    var divheight = document.getElementById(div).parentNode.scrollHeight+500;
	var divTop = document.getElementById(div).style.top;
	if (t>-divheight){
		document.getElementById(div).style.top = t + "px";
		t=t-amm;
		time = window.setTimeout("move_up('" + div + "','2')",50);
	} else {
		window.clearTimeout(time);
	}
}
function move_down(div,amm) {
	var divTop = document.getElementById(div).style.top;
	if (t<0){
		document.getElementById(div).style.top = t + "px";
		k = amm;
		k = Number(k);
		t = t+k;
		time = window.setTimeout("move_down('" + div + "','2')",50);
	} else {
		window.clearTimeout(time);
	}
}
function stopani(ex) {
	if(ex=='exit'){
		window.clearTimeout(time);
	}
}



var t=0;
var time;
function move_up2(div,amm) {
	var divTop = document.getElementById(div).style.top;
	if (t>-450){
		document.getElementById(div).style.top = t + "px";
		t=t-amm;
		time = window.setTimeout("move_up2('scroller2','2')",50);
	} else {
		window.clearTimeout(time);
	}
}
function move_down2(div,amm) {
	var divTop = document.getElementById(div).style.top;
	if (t<0){
		document.getElementById(div).style.top = t + "px";
		k = amm;
		k = Number(k);
		t = t+k;
		time = window.setTimeout("move_down2('scroller2','2')",50);
	} else {
		window.clearTimeout(time);
	}
}
function stopani(ex) {
	if(ex=='exit'){
		window.clearTimeout(time);
	}
}

function GetCode(source, eventArgs){
    document.getElementById("ctl00_hCode").value = eventArgs.get_value();
}

try {
    $(function () {

        var msie6 = $.browser == 'msie' && $.browser.version < 7;

        if (!msie6) {

            if ($("#comment").length > 0) {
                var top = $('#comment').offset().top - parseFloat($('#comment').css('margin-top').replace(/auto/, 0));
                $(window).scroll(function (event) {
                    // what the y position of the scroll is
                    var y = $(this).scrollTop();

                    // whether that's below the form
                    if (y >= top) {
                        // if so, ad the fixed class
                        $('#comment').addClass('fixed');
                    } else {
                        // otherwise remove it
                        $('#comment').removeClass('fixed');
                    }
                });
            }
           
        }
    });
}
catch (e) { }
