function eicon(str) {
	thestr = '<a href="mailto:'+str+'@jemasa-suri.com"><img src="images/i_mail.gif" alt="email" width="15" height="8" border="0" hspace="5"></a>';
	return thestr;
}

function eaddr(str) {
	thestr = '<a href="mailto:'+str+'@jemasa-suri.com">'+str+'@jemasa-suri.com</a>';
	return thestr;
}

var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;

if (checkIt('konqueror'))
{
	browser = "Konqueror";
	OS = "Linux";
}
else if (checkIt('omniweb')) browser = "OmniWeb"
else if (checkIt('opera')) browser = "Opera"
else if (checkIt('webtv')) browser = "WebTV";
else if (checkIt('icab')) browser = "iCab"
else if (checkIt('msie')) browser = "Internet Explorer"
else if (checkIt('firefox'))
{
	browser = "Firefox";
	version = detect.charAt(8);
}
else if (checkIt('safari')) 
{
	browser = "Safari";
	version = detect.charAt(8);
}
else if (!checkIt('compatible'))
{
	browser = "Netscape Navigator"
	version = detect.charAt(8);
}
else browser = "An unknown browser";

if (!version) version = detect.charAt(place + thestring.length);

if (!OS)
{
	if (checkIt('linux')) OS = "Linux";
	else if (checkIt('x11')) OS = "Unix";
	else if (checkIt('mac')) OS = "Mac"
	else if (checkIt('win')) OS = "Windows"
	else OS = "an unknown operating system";
}

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

function init() {
  setTimeout("window.onresize = redo", 1000);
}

function redo() {
  window.location.reload();
}

if (version < 5) { 
	location='upgrade.html';
}
if (browser=="Safari") {
	//location='upgrade.html';
}
if (version==5 && browser=="Internet Explorer" && OS=="Mac") {
	//location='upgrade.html';
}

function pop(width,height,url) {
	var args = 'width='+width+',height='+height+',resizable=yes,scrollbars=yes';
	popWindow = window.open(url,'popup',args);
	window.name = 'main';
	popWindow.focus();
}

function privacy() {
	var args = 'width=500,height=500,resizable=yes,scrollbars=auto';
	popWindow = window.open('privacy.html','popup',args);
	window.name = 'main';
	popWindow.focus();
}

function displayDiv(divToOpen) {
	var thechkbox= document.getElementById("chkListRequestType:0")
	var thediv = document.getElementById(divToOpen);
	if (thechkbox.checked){
		thediv.style.display = 'block';
	} else {
		thediv.style.display = 'none';
	}
}
function itemDisplay(tgt,tgl) {
	var thetarget = document.getElementById(tgt);
	if (tgl==1){
		if(browser == "Internet Explorer") {
			thetarget.style.display = "block";
		} else {
			thetarget.style.display = "";
		}
	} else {
		thetarget.style.display = "none";
	}
}
function event_register(id) {
	var theurl = 'news_events_register.aspx?id=' + id;
	var args = 'width=700,height=500,resizable=yes,scrollbars=auto';
	popWindow = window.open(theurl,'popup',args);
	window.name = 'main';
	popWindow.focus();
}
function printwin() {
	window.print();
	}
function swffwd(path) {
	var linkcheck = location.href.substring(location.href.length-1,location.href.length);
	if(linkcheck!="y") {
		var so = new SWFObject("fwd.swf", "fwd", "100", "100", "8", "#000000", true);
		var destiny = '/' + path;
		so.useExpressInstall('include/expressinstall.swf');
		so.addVariable("destiny", destiny);
		so.addVariable("browser", browser);
		so.addParam("wmode", "transparent");
		so.write("flashcontent");
	} else {
		setTimeout('printwin()', 1500);
	}
}
function printable(path) {
	pop('980','500',path);
	}
function getHeight() {
  var myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myHeight = document.body.clientHeight;
  }
  return myHeight;
}
function getWidth() {
  var myWidth = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
  }
  return myWidth;
}
function setFlashWidth(divid, newW){
	document.getElementById(divid).style.width = newW+"px";
}
function setFlashHeight(divid, newH){
	document.getElementById(divid).style.height = newH+"px";		
}
function extender(wd,ht) {
	var theHeight = getHeight();
	if(theHeight < ht) {
		setFlashHeight("flashcontent",ht);
	}
	var theWidth = getWidth();
	if(theWidth < wd) {
		setFlashWidth("flashcontent",wd);
	}
}

function booking() {
	window.open('booking.html','booking','height=400,width=350,scrollbars=yes,resizable=yes');
}
function join() {
	window.open('join.html','join','height=400,width=350,scrollbars=yes,resizable=yes');
}
function breakout(url) {
	window.open(url,'audio','height=158,width=238,scrollbars=no,resizable=no');
}
function videos(url) {
	window.open(url,'video','height=344,width=425,scrollbars=no,resizable=no');
}
function reviews(url) {
	window.open(url,'reviewswin','height=500,width=500,scrollbars=yes,resizable=yes');
}