// Redirections for old browsers

platform = navigator.platform;
browser = navigator.appName;
version = navigator.appVersion.substr(0, 1);
if (platform == "MacPPC")
{
	if (browser == "Microsoft Internet Explorer")
	{
		window.location="macIE.htm";
	}
}


if (browser == "Netscape")
{
	if (version == "4")
	{
		window.location="winNS4.htm";
	}
}

//Pop-up windows

function launchWindow(url, name){
	var str = "left=50,screenX=50,top=50,screenY=50";
	
		str += ",height=600";
		str += ",innerHeight=550";
		str += ",width=800";
		str += ",innerWidth=610";
		str += ",resizable";
		str += ",location";
		//str += ",menubar";
		str += ",scrollbars";
		str += ",status";
		str += ",toolbar";

	window.open(url, name, str);
	
}

function launchSeminars(url, name){
	var str = "left=50,screenX=50,top=50,screenY=50";
	
		str += ",height=450";
		str += ",innerHeight=450";
		str += ",width=600";
		str += ",innerWidth=600";
		str += ",scrollbars";

	semwin = window.open(url, name, str);
	if (parseInt(navigator.appVersion) >= 4) { semwin.window.focus(); }
	
}

// set timeout 3 secs for swap function
var inttimeout = 3000;


// function for swapping feature divs!  swap() is the initialiser on the page, to hide all except the first div tag - id='feature1'
function swap(){ 
	var ofeaturediv = document.getElementById('featureColumn');
	if(ofeaturediv == null){
		return;
	}
	var x = ofeaturediv.childNodes.length;
	if(x <= 1){
		return;
	}

	y=0;

	for(i=0; i<x; i++){ // hide all
		oinnerdiv = ofeaturediv.childNodes[i];
		if(oinnerdiv.tagName == 'DIV'){
			oinnerdiv.style.display='none';
			y++;
		}
	}

	// display first one
	oinnerdiv = document.getElementById('feature1');
	if(oinnerdiv == null){
		return;
	}
	oinnerdiv.style.display = '';
	
	if(y==1){
		return;
	}
	
	fcall = 'showhide(' + y + ')' ; // call timer function

	setTimeout(fcall, inttimeout);

}

// to show and hide div tags at set time intervals : expects div id's to be called feature1, feature2 etc.
function showhide(y){

	for(i=1; i<=y; i++){
		strdivname = 'feature'+i;
		oinnerdiv = document.getElementById(strdivname);

		if(oinnerdiv.style.display == ''){
			oinnerdiv.style.display = 'none';

			var j = i+1;
			if(j > y){
				j = 1;
			}

			strdivname1 = 'feature'+j;
			onextdiv = document.getElementById(strdivname1);
			onextdiv.style.display = '';
			break;
		}
	}

	fcall = 'showhide(' + y + ')' ; // call timer function

	setTimeout(fcall, inttimeout);
}



