/*

	seiko.js var 1.0 (ENGLISH)
	030324 added pulldown link
*/

var dir;
var tTimer;
var LoadFinish = false;

var isPc = (navigator.userAgent.indexOf("Windows") != -1);
var isMac = (navigator.userAgent.indexOf("Mac") != -1);
var isNS = (navigator.appName == "Netscape");
var isNS4 = (isNS && (navigator.userAgent.indexOf("Gecko") == -1));
var isNS6 = (isNS && (navigator.userAgent.indexOf("Gecko") != -1));
var isIE = ((navigator.userAgent.indexOf("MSIE") != -1) && (navigator.userAgent.indexOf("Opera") == -1));
var isIEPc = ((navigator.userAgent.indexOf("MSIE") != -1) && isPc && (navigator.userAgent.indexOf("Opera") == -1));
var isIEPc5 = ((navigator.userAgent.indexOf("MSIE 5.0") != -1) && isPc && (navigator.userAgent.indexOf("Opera") == -1));
var isIEPc55 = ((navigator.userAgent.indexOf("MSIE 5.5") != -1) && isPc && (navigator.userAgent.indexOf("Opera") == -1));
var isIEPc6 = ((navigator.userAgent.indexOf("MSIE 6.") != -1) && isPc && (navigator.userAgent.indexOf("Opera") == -1));
var isIEMac = ((navigator.userAgent.indexOf("MSIE") != -1) && isMac && (navigator.userAgent.indexOf("Opera") == -1));
var version = parseInt(navigator.appVersion);
var lP = location.pathname;



function formWin(url,h){
	wh = (h <= (screen.height-100))? h : screen.height-250;
	win_set = 'width=600,toolbar=yes,resizable=yes,menubar=no,status=yes,scrollbars=yes,left=10,top=10';
	win_set += ',height=' + wh;
	swin = window.open(url,'form',win_set);
	swin.focus();
}

function openWin(url,wname,w,h,resizable,toolbar,scrollbars){
		
		if (h >= (screen.height-30)){
			wh = screen.height-100;
			w += 18;
			scrollbars = 1;
		}else wh = h;
		
		win_set = 'width=' + w;
		win_set += ',height=' + wh;
		win_set += ',resizable=' + resizable;
		win_set += ',toolbar=' + toolbar;
		win_set += ',scrollbars=' + scrollbars;
		win_set += ',fullscreen=no';
		
		swin = window.open(url,wname,win_set);
		swin.focus();
}

function mapWin(url,height){
		wh = (!height)? '670' : height;
		if(screen.height >= 768) win_set = 'width=520,height=' + wh + ',scrollbars=0,resizable=0';
		else win_set = 'width=540,height=620,scrollbars=1,resizable=1';
		win_set += ',fullscreen=no,top=5,left=5';
		swin = window.open(url,'mapWin',win_set);
		swin.focus();
}

function gtwin(){
	openWin('/clock/index.asp','GLOBAL_TIME',405,260,0,0,0);
	//if(isMac) openWin('/clock/disclaimer.asp','disclaimer',305,300,0,0,0);
	//else openWin('/clock/disclaimer.asp','disclaimer',305,330,0,0,0);
}


function LinkSelect(form, sel){
	adrs = sel.options[sel.selectedIndex].value;
	if (adrs != "-" ){
		win_set = 'directories=yes,status=yes,scrollbars=yes,resizable=yes,toolbar=yes,menubar=yes,location=yes';
		swin = window.open(adrs,'New',win_set);
		swin.focus();
	}
}

function cHColor(layName){
	if(document.getElementById) document.getElementById(layName).style.backgroundColor =focusColor;
	else if(document.all) document.all(layName).style.backgroundColor=focusColor;
}

function deFColer(layName){
	if(document.getElementById) document.getElementById(layName).style.backgroundColor =defoultColor;
	else if(document.all) document.all(layName).style.backgroundColor=defoultColor;
}


function swichLayer(layerName,condition){
	if(isNS6) document.getElementById(layerName).style.visibility = condition;
	if(isIE) document.all[layerName].style.visibility =condition;
}


function chCourser(layerName){
	if (isNS6) layerName.style.cursor = "pointer";
	else layerName.style.cursor = "hand";
}

function getURL(url,target){
	mClose();
	sbmClose();
	if(target == '_blank'){
		win_set = 'directories=yes,status=yes,scrollbars=yes,resizable=yes,toolbar=yes,menubar=yes,location=yes';
		swin = window.open(url,'New',win_set);
		swin.focus();
	}else if(target == '_popup') openWin(url,'New',740,460,0,0,0);
	else if(target == '_basel') openWin(url,'BASEL',742,540,0,0,0);
	else  location.href = url;
}

function roll(imageName, imageState) {
	if (loaded == 1) {
		tabOn = eval(imageName+"_"+imageState+".src");
		document [imageName].src = tabOn;
	}
}

function underBar(text){
	self.status =' ';
	if(!text) self.status =' ';
	else self.status = text;
}

function init(){
	LoadFinish = true;
}

