var d=document; var l;
function showNav(id, left){var oId = 'sub'+id;if(d.getElementById(oId)){d.getElementById(oId).style.display = 'block';}}
function hideNav(id){var oId = 'sub'+id;if(d.getElementById(oId)){d.getElementById(oId).style.display = 'none';}}

var mNavIds = [];
function navState(id, state, last){
 if(l==undefined) {l=last;}
 if(l!=last) {
 hideNav(l);
 l=last;
 }
 clearTimer();
 if(state == 1){
 showNav(id);
 } else{
 setTimer(id);
 }
}
var tmr=null;
function setTimer(id){tmr = window.setTimeout("hideNav(\"" + id + "\")",500);}
function clearTimer(){if(tmr != null) window.clearTimeout(tmr);tmr = null;}

function setSize() {
 var c = document.getElementById('c');
 if(c && c.offsetHeight < 700) {
 var l = c.getElementsByTagName('div');
 for (var i=0; i<l.length;++i) {
 if(l[i].className.indexOf('body')!=-1){l[i].style.paddingBottom += 700-c.offsetHeight + 'px';}
 }
 }
}
function setSize_news() {
 var c = document.getElementById('c');
 if(c && c.offsetHeight < 700) {
 var l = c.getElementsByTagName('div');
 for (var i=0; i<l.length;++i) {
 if(l[i].className.indexOf('news')!=-1){l[i].style.paddingBottom += 700-c.offsetHeight + 'px';}
 }
 }
}
function popup(url, winname, v_width, v_height) {
 var popWidth="396";
 var popHeight="288";

 if (v_width != null)
 popWidth = v_width;
 if (v_height != null)
 popHeight = v_height;

 openerWidth = document.body.clientWidth;
 openerHeight = screen.availHeight;

 openTop = ( (openerHeight - 160) / 3);
 openLeft = ( (openerWidth - 300) / 2);

 windowOptions = "left=" + openLeft + ",top=" + openTop + ", width=" + popWidth + ", height=" + popHeight + ", menubar=no,scrollbars=no,status=no,toolbar=no,location=no,resizable=no";
 return window.open(url,winname,windowOptions);
}

function swapBtn() {
 if (document.getElementById('web_reg')) {
 document.getElementById('web_reg').src='http://www.siteworx.com/register-btn-rllovr';
 }
}

function swapBtnBck() {
 if (document.getElementById('web_reg')) {
 document.getElementById('web_reg').src='http://siteworx.com/_/Image/_/webinar_reg.jpg';
 }
}

function webinarBtn(n){
	var tSrc = n.src;
	if(tSrc.indexOf('_off.gif')!=-1){
		tSrc = tSrc.replace('_off.gif', '_on.gif');
	} else{
		tSrc = tSrc.replace('_on.gif', '_off.gif');
	};
	n.src = tSrc;
}