// Global JS


/* ------------------------------------------------------------------
Onload
------------------------------------------------------------------ */
window.onload = function(){
MM_preloadImages('../images/bn/bn_design.gif',
'../images/bn/bn_design_on.gif',
'../images/bn/bn_shuttyou.gif',
'../images/bn/bn_shuttyou_on.gif',
'../images/bn/bn_recruit.gif',
'../images/bn/bn_recruit_on.gif',
'../images/bn/bn_seo.gif',
'../images/bn/bn_seo_on.gif',
'../images/maincontents/bg_commodity_top.gif',
'../images/maincontents/bg_commodity_middle.gif',
'../images/maincontents/bg_commodity_bottom.gif',
'../images/maincontents/bg_image.jpg',
'../images/maincontents/bg_image_h.jpg',
'../images/bn/bn_web.gif',
'../images/bn/bn_web_on.gif')
}


/*
Standards Compliant Rollover Script
Author : Daniel Nolan
http://www.bleedingego.co.uk/webdev.php
*/

function initRollovers() {
if (!document.getElementById) return

var aPreLoad = new Array();
var sTempSrc;
var aImages = document.getElementsByTagName('img');

for (var i = 0; i < aImages.length; i++) { 
if (aImages[i].className == 'imgover') {
var src = aImages[i].getAttribute('src');
var ftype = src.substring(src.lastIndexOf('.'), src.length);
var hsrc = src.replace(ftype, '_on'+ftype);

aImages[i].setAttribute('hsrc', hsrc);

aPreLoad[i] = new Image();
aPreLoad[i].src = hsrc;

aImages[i].onmouseover = function() {
sTempSrc = this.getAttribute('src');
this.setAttribute('src', this.getAttribute('hsrc'));
} 

aImages[i].onmouseout = function() {
if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_on'+ftype, ftype);
this.setAttribute('src', sTempSrc);
}
}
}
}

window.onload = initRollovers;





/* ------------------------------------------------------------------
showFlash
------------------------------------------------------------------ */
function showFlash(flash_src,flash_width,flash_height){
	var doc = "";
	doc += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ';
	doc += 'width="' + flash_width + '" ' + 'height="' + flash_height + '"' + '>';
	doc += '<param name="movie" value="' + flash_src + '"><param name="quality" value="high"><param name="wmode" value="transparent" />';
	doc += '<embed src="' + flash_src + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" ';
	doc += 'width="' + flash_width + '" height="' + flash_height + '" wmode="transparent">'
	doc += '</embed></object>'
	document.writeln(doc);
}

