function openWindow(fileName,windowName,theWidth,theHeight,param) {
	
	var objNewWin;
	var x = theWidth;
	var y = theHeight;

	var bIsXP = false;
	if(navigator.userAgent.indexOf("Windows NT 5.1")>-1){
      bIsXP=true;
   }
   
   if(bIsXP==true){
      //y += 28;
      y += 50;
   }

	var sx = window.screen.width  / 2 - x / 2;
	var sy = window.screen.height / 2 - y / 2 - 40;

	etcParam = "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=0";


	if (sy < 0 ) {
	sy = 0;
	}

	var sz = ",top=" + sy + ",left=" + sx;

	if (windowName == "newMessageWindow")
	{
	windowName = new String(Math.round(Math.random() * 100000));
	}
	
	
	objNewWin = window.open(fileName+param,windowName, etcParam + ",width=" + x + ",height=" + y + sz );	
	objNewWin.focus();

}

function openWindowScroll(fileName,windowName,theWidth,theHeight,param) {


	var objNewWin;
	var x = theWidth;
	var y = theHeight;

	var bIsXP = false;
	if(navigator.userAgent.indexOf("Windows NT 5.1")>-1){
      bIsXP=true;
   }
   
   if(bIsXP==true){
      y += 28;
   }

	var sx = window.screen.width  / 2 - x / 2;
	var sy = window.screen.height / 2 - y / 2 - 40;

	etcParam = "toolbar=0,location=0,directories=0,status=1,menubar=0,resizable=1,scrollbars=yes";


	if (sy < 0 ) {
	sy = 0;
	}

	var sz = ",top=" + sy + ",left=" + sx;

	if (windowName == "newMessageWindow")
	{
	windowName = new String(Math.round(Math.random() * 100000));
	}

	objNewWin = window.open(fileName+param,windowName, etcParam + ",width=" + x + ",height=" + y + sz );
	objNewWin.focus();
}

// URL ÀÌµ¿
function goUrl(url) {
		location.href = url;
}

// ÇÃ·¡½Ã·ÎºÎÅÍ È£ÃâµÇ¾î ÆäÀÌÁö ÀÌµ¿
function goPageByCid (id)
{
	var url = "index.php?cid="+id;
	//location.replace(url);
	location.href = url;
}


function showSwf(s, d, m, w, h)
{
	document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width="+w+" height="+h+" id="+d+">");
	document.write("<param name=wmode value="+m+" />");
	document.write("<param name=movie value="+s+" />");
	document.write("<param name=quality value=high />");
	document.write("<param name=menu value=false />");
	document.write("<embed src="+s+" wmode="+m+" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash\" width="+w+" height="+h+">");
	document.write("</embed>");
	document.write("</object>");
}

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 ) { 
      
      if ( getType == "flash") 
      { 

        clsid = "D27CDB6E-AE6D-11cf-96B8-444553540000";        
        codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"; 
        pluginspage = "http://www.macromedia.com/go/getflashplayer"; 
        embedType = "application/x-shockwave-flash"; 
      } 
      /* type Ãß°¡ 
      else if ( ) 
      { 
      } 
      */ 
            
      parameter += "<param name='movie' value='"+ s + "'>\n";  
      parameter += "<param name='quality' value='high'>\n";    
	  parameter += "<param name=\"allowScriptAccess\" value=\"always\">\n";    
      
      src = s; 
      width = w; 
      height = h; 
  } 
  
  this.parameter = function( parm , value ) {      
      parameter += "<param name='"+parm +"' value='"+ value + "'>\n";        
      allParameter += " "+parm + "='"+ value+"'"; 
  }  
  
  this.show = function() { 
      if ( clsid ) 
      { 
        obj = "<object classid=\"clsid:"+ clsid +"\" codebase=\""+ codebase +"\" width='"+ width +"' height='"+ height +"'>\n"; 
      } 
      
      embed = "<embed src='" + src + "' pluginspage='"+ pluginspage + "'  allowScriptAccess=\"always\" swLiveConnect=true type='"+ embedType + "' width='"+ width + "' height='"+ height +"'"+ allParameter +" ></embed>\n"; 
      
      if ( obj ) 
      { 
        embed += "</object>\n"; 
      } 
      
      html = obj + parameter + embed; 
      
      document.write( html );  
  } 
  
var stmnLEFT = 900; // ½ºÅ©·Ñ¸Þ´ºÀÇ ÁÂÃø À§Ä¡
var stmnGAP1 = 68; // ÆäÀÌÁö Çì´õºÎºÐÀÇ ¿©¹é (ÀÌº¸´Ù À§·Î´Â ¿Ã¶ó°¡Áö ¾ÊÀ½)
var stmnGAP2 = 68; // ½ºÅ©·Ñ½Ã ºê¶ó¿ìÀú »ó´Ü°ú ¾à°£ ¶ç¿ò. ÇÊ¿ä¾øÀ¸¸é 0À¸·Î ¼¼ÆÃ
var stmnBASE = 68; // ½ºÅ©·Ñ¸Þ´º ÃÊ±â ½ÃÀÛÀ§Ä¡ (¾Æ¹«·¸°Ô³ª ÇØµµ »ó°üÀº ¾øÁö¸¸ stmnGAP1°ú ¾à°£ Â÷ÀÌ¸¦ ÁÖ´Â°Ô º¸±â ÁÁÀ½)
var stmnActivateSpeed = 2; // ¿òÁ÷ÀÓÀ» °¨ÁöÇÏ´Â ¼Óµµ (¼ýÀÚ°¡ Å¬¼ö·Ï ´Ê°Ô ¾Ë¾ÆÂ÷¸²)
var stmnScrollSpeed = 1; // ½ºÅ©·ÑµÇ´Â ¼Óµµ (Å¬¼ö·Ï ´Ê°Ô ¿òÁ÷ÀÓ)

var stmnTimer;

function RefreshStaticMenu()
{
  var stmnStartPoint, stmnEndPoint, stmnRefreshTimer;

  stmnStartPoint = parseInt(floater.style.top, 10);
  stmnEndPoint = document.body.scrollTop + stmnGAP2;
  if (stmnEndPoint < stmnGAP1) stmnEndPoint = stmnGAP1;

  stmnRefreshTimer = stmnActivateSpeed;

  if ( stmnStartPoint != stmnEndPoint ) {
    stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 15 );
    floater.style.top = parseInt(floater.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount );
    stmnRefreshTimer = stmnScrollSpeed;
  }

  stmnTimer = setTimeout ("RefreshStaticMenu();", stmnRefreshTimer);
}


function InitializeStaticMenu()
{
  floater.style.top = document.body.scrollTop + stmnBASE;
  RefreshStaticMenu();
  floater.style.left = stmnLEFT;
}


} 


// RSS Window Open
function rssOpen(tbName){
	
	var width = 500;
	var height = 100;
	var fileName  = "./tpl/rss/rsscopy.html?tb="+tbName;
	var param = "";

	window.open(fileName,"rss", "width="+width+",height="+height+",left=100,top=100,'location=no, directories=no,resizable=no,status=no,toolbar=no,menubar=no");

	
}
