// Flash publish
function swfprint(furl,fwidth,fheight,transoption)	{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+ fwidth +'" height="' + fheight +'" align="middle">');
	document.write('<param name="movie" value="'+ furl +'"/>');
	if (transoption == "t")	{
		document.write('<param name="wmode" value="transparent"/>');
	} else if	(transoption == "o")	{
		document.write('<param name="wmode" value="opaque"/>');
	}
	document.write('<!-- Hixie method -->');
	document.write('<!--[if !IE]> <-->');
	document.write('<object type="application/x-shockwave-flash" data="'+ furl +'" width="'+ fwidth +'" height="' + fheight +'"');
	if (transoption == "t")	{
		document.write(' wmode="transparent"');
	} else if	(transoption == "o")	{
		document.write(' wmode="opaque"');
	}
	document.write('></object>');
	document.write('<!--> <![endif]-->');
	document.write('</object>');
}

function swfprint_movie(furl,fwidth,fheight,transoption)	{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540003" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' +fwidth+ '" height="' +fheight+ '" VIEWASTEXT>');
    document.write('<param name="movie" value="'+furl+'">');
    document.write('<param name="quality" value="high">');
    document.write('<embed src="'+furl+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' +fwidth+ '" height="' +fheight+ '"></embed></object>');
}

// RollOver
function imageOver(imgs) {
	imgs.src = imgs.src.replace("off.gif", "on.gif");
}
function imageOut(imgs) {
	imgs.src = imgs.src.replace("on.gif", "off.gif");
}

// Go to URL fot Microsites
function gositemap()	{
	opener.location.href = '/util/sitemap.asp';
	window.close();
}
function goifez()	{
	opener.location.href = '/main.asp';
	window.close();
}

function initMoving(target) {
	if (!target)
		return false;

	var obj = target;
	obj.initTop = 175;
	obj.initLeft = 7;
	obj.bottomLimit = document.documentElement.scrollHeight - 125;
	obj.topLimit = 128;

	obj.style.position = "absolute";
	obj.top = obj.initTop;
	obj.left = obj.initLeft;
	obj.style.top = obj.top + "px";
	obj.style.left = obj.left + "px";

	obj.getTop = function() {
		if (document.documentElement.scrollTop) {
			return document.documentElement.scrollTop;
		} else if (window.pageYOffset) {
			return window.pageYOffset;
		} else {
			return 0;
		}
	}
	obj.getHeight = function() {
		if (self.innerHeight) {
			return self.innerHeight;
		} else if(document.documentElement.clientHeight) {
			return document.documentElement.clientHeight;
		} else {
			return 500;
		}
	}
	obj.move = setInterval(function() {
		pos = obj.getTop() + 50;
// obj.getTop() + obj.getHeight() / 2 - 200;
		if (pos > obj.bottomLimit)
			pos = obj.bottomLimit
		if (pos < obj.topLimit)
			pos = obj.topLimit

		interval = obj.top - pos;
		obj.top = obj.top - interval / 3;

		obj.style.top = obj.top + "px";
	}, 40)
}


// Embed ¹× swf ÆÄÀÏ µ¿½ÃÁ¦¾î //

function setEmbed() 
{ 
  var obj = new String; 
  var parameter = new String; 
  var embed = new String; 
  var html = new String; 
  var allParameter = new String; 
  var clsid = new String; 
  var codebase = new String; 
  var pluginspace = new String; 
  var embedType = new String; 
  var src = new String; 
  var width = new String; 
  var height = new String; 

  this.init = function( getType , s ,w , h, oId ) { 
      if ( getType == "flash") 
      { 
        clsid = "D27CDB6E-AE6D-11cf-96B8-444553540000";        
        codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"; 
        pluginspage = "http://www.macromedia.com/go/getflashplayer"; 
        embedType = "application/x-shockwave-flash"; 
      } 
      else if (getType == "movie" ) 
      { 
        clsid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" ;
        codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" ;
        embedType="application/x-oleobject" ;
        //embedType="application/x-mplayer2";
  pluginspage="http://www.microsoft.com/windows/mediaplayer/download/default.asp"
      } 
      /* type Ãß°¡ 
      else if ( ) 
      { 
      } 
      */
            
      parameter += "<param name='movie' value='"+ s + "'>\n";  
      parameter += "<param name='quality' value='high'>\n";    
      
      
      src = s; 
      width = w; 
      height = h; 
      objId= oId;
  } 
  
  this.parameter = function( parm , value ) {      
      parameter += "<param name='"+parm +"' value='"+ value + "'>\n";        
      allParameter += " "+parm + "='"+ value+"'"; 
  }  
  

  this.show = function() { 
      if ( clsid ) 
      { 
        obj = "<object id=" + objId + " classid=\"clsid:"+ clsid +"\" codebase=\""+ codebase +"\" width='"+ width +"' height='"+ height +"' value='" + objId + "'>\n"; 
      } 
       embed = "<embed src='" + src + "' pluginspage='"+ pluginspage + "' type='"+ embedType + "' width='"+ width + "' height='"+ height +"'"+ allParameter +" ></embed>\n"; 

      if ( obj ) 
      { 
        embed += "</object>\n"; 
      } 
      html = obj + parameter + embed; 
      document.write( html );  

 if ( objId)
       { 
         var Objv = document.getElementById(objId);
         if (Objv.value==objId) {
          eval("document." + objId + ".focus();");
         }
     }
  } 
}
