
var siteBaseUrl;
$A(document.getElementsByTagName("script")).findAll( function(s) {
  return (s.src && s.src.match(/layout\.js(\?.*)?$/))
}).each( function(s) {
	var _scriptSrc = s.src;
	siteBaseUrl = _scriptSrc.replace(/\/js\/layout\.js(\?.*)?$/,'/');
	siteBaseUrl = siteBaseUrl.replace(/^http:\/\/.*?\//,'/');
});

Event.observe(window, 'load', function() {
	/*
	$$('#loginBox #fldUsername').each(function(element){
		new textboxImageLabel(element, {
			backgroundImage: siteBaseUrl + 'images/index/login_id_bg.gif'
		});
	});
	$$('#loginBox #fldPassword').each(function(element){
		new textboxImageLabel(element, {
			backgroundImage: siteBaseUrl + 'images/index/login_pw_bg.gif'
		});
	});
	*/
	$$('#search #fldTopSearch').each(function(element){
		new textboxImageLabel(element, {
			backgroundImage: siteBaseUrl + 'images/layout/search_bg.gif'
		});
	});

}, false);


function gotoSelect(obj, target) {
	var link = obj.options[obj.selectedIndex].value;
	if (target == "_self") {
		document.location.href = link;
	} else {
		window.open(link, target);
	}
}