﻿var m_timeout = 250;
var m_closetimer = 0;
var m_ddmenuitem = 0;

function jsddm_open() {
    jsddm_canceltimer();
    jsddm_close();
    m_ddmenuitem = $(this).find('div').eq(0).css('visibility', 'visible');
}

function jsddm_close()
{ if (m_ddmenuitem) m_ddmenuitem.css('visibility', 'hidden'); }

function jsddm_timer()
{ m_closetimer = window.setTimeout(jsddm_close, m_timeout); }

function jsddm_canceltimer() {
    if (m_closetimer) {
        window.clearTimeout(m_closetimer);
        m_closetimer = null;
    }
}

$(document).ready(function () {
    $('#nav > li').bind('mouseover', jsddm_open);
    $('#nav > li').bind('mouseout', jsddm_timer);
});

document.onclick = jsddm_timer;


function go(loc) {
    window.location.href = loc;
}

function maillink(thename,theURL,linkText){
	document.write("<a href=mailto:" + thename + "@" + theURL + ">" + linkText + "@" + theURL + "</a>");
}

function gototheurl(theURL){
	document.location.href = theURL;
}

function replace_morethan() {
	document.body.innerHTML = document.body.innerHTML.replace(RegExp('More Than','g'), 'MORE TH>N');
	document.body.innerHTML = document.body.innerHTML.replace(RegExp('More Th&gt;n','g'), 'MORE TH>N');
	document.title = document.title.replace(RegExp('More Than','g'), 'MORE TH>N');
}

function selecturl(s){
	var gourl = s.options[s.selectedIndex].value;
	if ((gourl != null) && (gourl != "")){
	    window.top.location.href = gourl;
	}
}

function gocar(url) 
{ 
var loc = (url);
myeducation=window.open(loc, 'GoEd','width=775,height=555,top=2, left=2,resizable=yes,scrollbars=yes,menubar=no,status=yes,toolbar=no,location=no ');

}

function popitup(url) {
    newwindow = window.open(url, 'name', 'height=400,width=450,scrollbars=1');
    if (window.focus) { newwindow.focus() }
    return false;
}

