/*
	HITACHI CONSTRUCTION MACHINERY
	JS FILE [hcm_basic.js]

Update history ---------------------------------------------------
09/06/11 supported IE8.
------------------------------------------------------------------
 */

var agent = navigator.userAgent.toLowerCase();
var w3c = document.getElementById;
var opera = agent.indexOf("opera",0) != -1;
var ie = ('\v'=='v')? true : false;// IE 8.
var modernIe = ie && agent.indexOf("trident") != -1;// IE 8.
var legacyIe = ie && !modernIe;// IE 8.
var gecko = agent.indexOf("gecko") != -1 && !opera;
var version = navigator.appVersion;
var fileName = new String(location.pathname);
var domainName = new String(location.host);
var cdnPath = (location.protocol == 'http:')? 'http://hcm.vo.llnwd.net/e1' : '';

/*	fixed 06/05 */
function checkregionpulldown(form){
    if (form.url.value != "-"){
        if(form.action){
            return true;
        }else{
            location.href = form.url.value;
            return false;
        }
    }else{
            return false;
    }
}


/*
original file is "CSS Browser Selector"
(http://rafael.adm.br/css_browser_selector) 
*/
var sethtmlCls = function(){
	var u = navigator.userAgent.toLowerCase(),
		is = function(t){ return u.indexOf(t) != -1;},
		hs = document.getElementsByTagName('html')[0],
		brw = (/msie ([\d.]{0,3})/i.test(u))? ("msie " + (is("mac")? "mac" : "") + "ie" + ((RegExp.$1.replace(".","")%55==0)? "55": RegExp.$1.substring(0,1))) : is('opera')? "opera" : is('safari')? "safari" : "gecko";
	brw += " js";
	hs.className = brw;
}();


function setCss(){
	var path = '/au/css/adj/';
	var cssName = (gecko) ? "gecko" : ((opera) ? "opera" : false);
	
	if(!!cssName){
		document.open();
		document.write('<link rel=\"stylesheet\" type=\"text/css\" media=\"screen,print\" href=\"' + path + cssName + '.css\">');
		document.close();
	}
}
var setupCss = new setCss;




