// toggling register/login pop-up

function init() {
    if (document.getElementById("reg_log_popup") == null) return;
	document.getElementById("reg_log_popup").className = "hidden";
	el = document.getElementById("register_login");
	el.onclick = swap;
	el.onmouseover = show_hand;
	el.onmouseout = hide_hand;
}

function swap() {
	el = document.getElementById("reg_log_popup");
	if (el == null) return;
	if (el.className == "hidden") {
		el.className = "visible";
	} else {
		el.className = "hidden";
	}
}

function show_hand() {
	this.style.cursor = "pointer";
}

function hide_hand() {
	this.style.cursor = "default";
}


/*
// cycling "Featured Partners" in lower left

var imagesrc = new Array();
imagesrc[0] = 'images/logos/emss_152px.jpg';
imagesrc[1] = 'images/logos/hiqube_152px.gif';
imagesrc[2] = 'images/logos/magna_152px.gif';
imagesrc[3] = 'images/logos/metacomp_152px.gif';
imagesrc[4] = 'images/logos/ncode_152px.gif';
imagesrc[5] = 'images/logos/cradle_152px.gif';

var imagelink = new Array();
imagelink[0] = 'PartnerDetails.aspx?partner_id=14';
imagelink[1] = 'PartnerDetails.aspx?partner_id=2';
imagelink[2] = 'PartnerDetails.aspx?partner_id=15';
imagelink[3] = 'PartnerDetails.aspx?partner_id=7';
imagelink[4] = 'PartnerDetails.aspx?partner_id=5';
imagelink[5] = 'PartnerDetails.aspx?partner_id=13';

var imagealt = new Array();
imagealt[0] = 'EMSS - Electromagnetic Software and Systems';
imagealt[1] = 'HiQube - Elevating Data to Knowledge';
imagealt[2] = 'Magna Powertrain - driven by passion';
imagealt[3] = 'Metacomp Technologies';
imagealt[4] = 'nCode';
imagealt[5] = 'Software Cradle Co., Ltd.';

var count = imagesrc.length;
var cycletime = 4000;  // in milliseconds, 4000 = 4 seconds
var which = -1;

var preBuffer = new Array();
for (i = 0; i < count; i++) {
   preBuffer[i] = new Image();
   preBuffer[i].src = imagesrc[i];
}

function cycleimg() {
	var the_anchor = document.getElementById('featured_partner');
	var the_image = the_anchor.getElementsByTagName('img')[0];
	// randomly choose the image with no repeats
	var cur = which;
	do {
	    which = Math.floor(Math.random() * count);
	} while (which == cur);
	the_anchor.href = imagelink[which];
	the_image.src = imagesrc[which];
	the_image.alt = imagealt[which];
	window.status = imagesrc[which];
//	which = (which + 1) % count;
}

window.onload = function() {
	init();
	setInterval(cycleimg, cycletime);
	cycleimg();
}
*/