// JavaScript Document

//popup div for widget code
var newwindow;
function open_window(url)
{
	newwindow=window.open(url,'name','toolbar=no, location=no, status=no, menubar=no, scrollbars=no, resizable=yes, width=430, height=600');
	//if (window.focus) {newwindow.focus()}
}


// div visible and invisible
function toggle_visibility2(id) {
	var e = document.getElementById(id); 
	if(e.style.visibility == 'visible') {
		e.style.visibility = 'hidden'; 
	}
	else {
		e.style.visibility = 'visible'; 
	}
} 

//this closes the share box when the user clicks on the red button
function close_share(id){
	 var e = document.getElementById(id); 
	 e.style.visibility = 'hidden'; 
}

//this open's the client mail program to send an email
function mailpage() {
	mail_str = "mailto:?subject= Link to TCIP Conference Web page";
	mail_str += "&body= I thought you might be interested in the TCIP Conference";
	mail_str += ". You can view it at, " + location.href;
	location.href = mail_str;
}

//this is the stylesheet script 

var styleSheetSuffix = "";

if((navigator.appVersion.indexOf("Mac")!= -1)) {
    // This is returned for all browsers on the Mac
	styleSheetSuffix += "_nav";
} else {
	if (navigator.appVersion.indexOf("MSIE")>= 1) {
		//If the browser is IE
		var iInfo = navigator.appVersion.indexOf("MSIE ") + 5;
		var sInfo = navigator.appVersion.substring(iInfo);
		sVersion = parseInt(sInfo) + "";
		
		if (sVersion < 7) {
			// Select this stylsheet for IE version less than 7 
			styleSheetSuffix += "_ie6"; 
			document.write("<link rel=\"stylesheet\" href=\"/styles/tcip"   + styleSheetSuffix + ".css\" type=\"text/css\">");
			
			// correctly handle PNG transparency in Win IE 5.5 & 6.
			/*document.write("<script type=\"text/javascript\" src=\"/scripts/supersleight.js\"></script>");*/

		} else {
			//Select this stylesheet for IE version 7 or higher
			styleSheetSuffix; 
		}
	} else {
		// This when the Browser is not IE (FF in Windows)
		styleSheetSuffix += "_nav";
	}
}
	  
document.write("<link rel=\"stylesheet\" href=\"/styles/tcip_widget"   + styleSheetSuffix + ".css\" type=\"text/css\">");   		
