/* 
JavaScript: com.js (http://k-associates.com/)

last updated on 2003.12.05
 (c) 2003 YOSUKE INUI
*/ 

// Check URL for KYOTO-ACCESS (http://www.kyotoaccess.com/) and K-ASSOCIATES/Architects
if	(window.location.hostname.indexOf('kyotoaccess.com',0) != -1)		{ window.top.location.href = 'http://www.kyotoaccess.com/'; }
if	(window.location.hostname.indexOf('www.k-associates.com',0) != -1)	{ window.top.location.href = 'http://k-associates.com' + (window.top.location.pathname) + (window.top.location.search) + (window.top.location.hash); }

function Email () {
var Email_Addr	= 'kishi' + '\@' + 'k-' + 'associates' + '.com';
var string;
switch (arguments[0]) { 
	case	'footer':	string	= '<a href="' + 'mail' + 'to:' + Email_Addr + '" lang="en" class="e10"><img src="/k.associates/com/img/footer_email-.gif" width="200" height="15" border="0" alt="' + Email_Addr + '"></a>'; break; 
	case	'window':	string	= '<a href="' + 'mail' + 'to:' + Email_Addr + '" lang="en" class="e10"><img src="/k.associates/com/img/content_email-.gif" width="200" height="15" border="0" alt="' + Email_Addr + '"></a>'; break; 
	default:		string	= '<a href="' + 'mail' + 'to:' + Email_Addr + '" lang="en" class="e10">' + Email_Addr + '</a>'; break; 
} 

document.open();
document.write(string);
document.close();
}

function topButton () {
	if	( (top.location.href == self.location.href) || (window.document.referrer != '' && window.document.referrer.indexOf(self.location.hostname,0) == -1) )	{ document.writeln ('<a href="http://' + self.location.host + '/" onclick="return WOF();" onkeypress="return WOF();"><img src="http://' + self.location.host + '/k.associates/com/img/homepage-.gif" width="80" height="15" border="0" alt="HOMEPAGE"></a><br>'); }
}

function WOF () {
if (!winIE) {
	if		(!window.opener)		{ return true; }
	else if	(window.opener)		{ window.opener.focus(); window.close(); return false; }
	else							{ return true;}
} else {
	if		(window.opener.closed)	{ return true;}
	else if	(window.opener)		{ window.opener.focus(); window.close(); return false; }
	else							{ return true;}
 }
}
