/*=============================================
	KAZZ-MATU.JS ver 2.226
=============================================*/

/*--------------- [ UserAgent ] ---------------*/
var SitePath = '.';

var Mac = navigator.appVersion.indexOf('Mac',0) != -1;
var Win = navigator.appVersion.indexOf('Win',0) != -1;
var IE  = navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1;
var IE6 = navigator.appVersion.indexOf("MSIE 6",0) != -1;
var iP  = navigator.userAgent.search(/iPhone/) != -1;

var flash_ver = 10;

/*--------------- [ init functions ] ---------------*/

function addLoadEvent(func){
	if (!document.getElementById) return;

	var oldonload = window.onload;
	if (typeof window.onload != 'function'){
	   	window.onload = func;
	} else {
		window.onload = function(){
			oldonload();
			func();
		}
	}
}

/*--------------- [ FAVICON ] ---------------*/
document.write('<meta http-equiv="imagetoolbar" content="no" />');
document.write('<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />');


addLoadEvent(NaviImges);

/*--------------- [ Window Popup ] ---------------*/
function NewWindow(theURL,winName,features) {
	var the_window = window.open(theURL,winName,features);
	the_window.focus();
}

/*--------------- [ Flash View 2 ] ---------------*/
function FlashView(filename,width,height,wmode,obj_id,bg){
	var MM_contentVersion = flash_ver;
	var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
	if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
		for (var i = 0; i < words.length; ++i){
			if (isNaN(parseInt(words[i])))
			continue;
			var MM_PluginVersion = words[i];
		}
		var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
	}else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
		try{
			var flashVersion=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").FlashVersion();
			flashVersion=Math.floor(flashVersion / 0x10000);
		}catch(e){
			flashVersion = MM_contentVersion;
		}
		var MM_FlashCanPlay = flashVersion >= MM_contentVersion;
	}

	if(MM_FlashCanPlay){
		var obj = document.getElementById(obj_id);
		obj.style.display = 'none';
		var obj_par = obj.parentNode;
		var date = new Date();
		var now = date.getTime();


		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+MM_contentVersion+',0,0,0" width="' + width + '" height="' + height + '">');
		document.write(' <param name="movie" value="' + filename +'?'+now+ '" />');
		document.write(' <param name="bgcolor" value="' + bg + '" />');
		if(wmode==1){
			document.write(' <param name="wmode" value="transparent" />');
		}
		document.write(' <param name="quality" value="high" />');
		if(wmode==1){
			document.write(' <embed src="' + filename +'?'+now+ '" quality="high" bgcolor="'+ bg +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + ' " height="' + height + '" wmode="transparent"></embed>');
		}else{
			document.write(' <embed src="' + filename +'?'+now+ '" quality="high" bgcolor="'+ bg +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + ' " height="' + height + '"></embed>');
		}
		document.write('</object>\n');

		obj_par.removeChild(obj);

	}else{
		//NoFlash
	}
}

/*--------------- [ RollOver type2 ] ---------------*/
function NaviImges() {
	if (!document.getElementById) return
	
	var ImgLoad = new Array();
	var sTempSrc;
	var aImages = document.getElementsByTagName('img');

	for (var i = 0; i < aImages.length; i++) {		
		//if (aImages[i].className == 'nav') {
		if (aImages[i].className.indexOf('nav',0) != -1) {
			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);
			
			ImgLoad[i] = new Image();
			ImgLoad[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);
			}
		}
	}
}

/*--------------- [ include GoogleView ] ---------------*/
var gSrc = new Array();


function includeGoogleView(n){
	document.write(gSrc[n]);
}

/*--------------- [ IE PNG ] ---------------*/
function iePNG(){
	var arVersion = navigator.appVersion.split("MSIE")
	var version = parseFloat(arVersion[1])
	
	if ((version >= 5.5) && (document.body.filters)) 
	{
	
	   for(var i=0; i<document.images.length; i++)
	   {
		  var img = document.images[i]
		  var imgName = img.src.toUpperCase()
		  if ((imgName.substring(imgName.length-3, imgName.length) == "PNG")&&(img.className == "fix"))
		  {
			 var imgID = (img.id) ? "id='" + img.id + "' " : ""
			 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
			 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
			 var imgStyle = "display:inline-block;" + img.style.cssText 
			 if (img.align == "left") imgStyle = "float:left;" + imgStyle
			 if (img.align == "right") imgStyle = "float:right;" + imgStyle
			 if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
			 var strNewHTML = "<span " + imgID + imgClass + imgTitle
			 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
			 + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
			 + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
			 img.outerHTML = strNewHTML
			 i = i-1
		  }
	   }
	}
}

/*--------------- [ SCRIPT INCLUDE ] ---------------*/
if( Mac && IE){
	//MacIE Only
}else{
	document.write('<script type="text/javascript" src="'+SitePath+'/top_share/js/jquery.js"></script>');
	document.write('<script type="text/javascript" src="'+SitePath+'/top_share/js/action.js"></script>');
}
