function setPng24(obj) {
    obj.width=obj.height=1;
    obj.className=obj.className.replace(/\bpng24\b/i,'');
    obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
    obj.src='';
    return '';
}

//******************************************************************************************************************



function bluring(){
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin=bluring;


//******************************************************************************************************************



function link(link,target,width,height,scroll){
  switch(link){
    case("1") : url = '/bt_ski/ski_02_3.php?pageNum=2&sub=2'; break;
    case("2") : url = '/bt_customer/cus_04.php'; break;
    case("3") : url = '/board/board/board.php?bid=B00005'; break;
    case("4") : url = '/bt_ski/ski_02.php?pageNum=2&sub=2'; break;
    case("5") : url = '/bt_bearstown/bears_041.php?pageNum=1&sub=4'; break;
    case("6") : url = '/webcam/index1.htm';target='blank' ; break;
    case("7") : url = '/bt_customer/cus_041.php' ; break;
    case("8") : url = '/bt_customer/cus_event.php?onEnterFrame=%5Btype+Function%5D&pageNum=8&sub=3'; break;
    case("9") : url = 'http://weather.media.daum.net/?pageId=309&ski=SKI004#menuSubLayer_22';target='blank' ; break;
    case("10") : url = '/bt_accomodation/acc_07.php?onEnterFrame=%5Btype+Function%5D&pageNum=6&sub=7' ; break;
    default : url = '';
  }
  if(target=="blank") window.open(url);
  else if(target=="open") window.open(url,'','width='+width+',height='+height+',scrollbars='+scroll);
  else location.href = url;
}







function goTop(orix,oriy,desx,desy) {
	var Timer;
	var winHeight = document.body.scrollTop;
	if(Timer) clearTimeout(Timer);
	startx = 0;
	starty = winHeight;
	if(!orix || orix < 0) orix = 0;
	if(!oriy || oriy < 0) oriy = 0;
	var speed = 7;
	if(!desx) desx = 0 + startx;
	if(!desy) desy = 0 + starty;
	desx += (orix - startx) / speed;
	if (desx < 0) desx = 0;
	desy += (oriy - starty) / speed;
	if (desy < 0) desy = 0;
	var posX = Math.ceil(desx);
	var posY = Math.ceil(desy);
	window.scrollTo(posX, posY);
	if((Math.floor(Math.abs(startx - orix)) < 1) && (Math.floor(Math.abs(starty - oriy)) < 1)){
		clearTimeout(Timer);
		window.scroll(orix,oriy);
	}else if(posX != orix || posY != oriy){
		Timer = setTimeout("goTop("+orix+","+oriy+","+desx+","+desy+")",15);
	}else{
		clearTimeout(Timer);
	}
}
//--------------------------------------------------------------------------------------

function flashview (dirNswf,fwidth,fheight,varvalues) {

 var flashobjec="";
 flashobjec+="<object classid=\'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\' codebase=\'http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\' width=\'"+fwidth+"\' height=\'"+fheight+"\'>";
 flashobjec+="<param name=\'movie\' value='"+dirNswf+"'>";
 flashobjec+="<param name=\'quality\' value=\'high\'>";
 flashobjec+="<param name=\'wmode\' value=\'transparent\'>";
 flashobjec+="<param name=\'allowScriptAccess\' value=\'always\'>";
 flashobjec+="<param name=\'FlashVars\' value=\'"+varvalues+"\'>";
 flashobjec+="<embed src='"+dirNswf+"' quality=\'high\' pluginspage=\'http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\' wmode=\'transparent\' type=\'application/x-shockwave-flash\' width=\'"+fwidth+"\' height=\'"+fheight+"\'></embed>";
 flashobjec+="</object>";

 document.write(flashobjec);

}
//--------------------------------------------------------------------------------------

//--------------------------------------------------------------------------------------
var ElementObject;
var params = new Array();
var ParamElements = new Array();

// document.write

function startHeadObject() {
	document.write("<object ");
}

function setHeadObject(pName, pValue ) {
  document.write(pName + " = '" + pValue + "' " );
}

function endHeadObject() {
	document.write(">");
}

function setEtc(str){
        document.write(str);
}

function endObject() {
	document.write("</object>");
}

function setParamObject(pName, pValue) {
	pValue = pValue.replace("'","`");
	document.write("<param name='" + pName + "' VALUE='" + pValue + "'>");
	params[pName] = pValue;
}

function startHeadApplet() {
	document.write("<applet ");
}

function endHeadApplet() {
	document.write(">");
}

function endApplet() {
	document.write("</applet>");
}


function getCookie(strName){
  var strArg = new String(strName + "=");
  var nArgLen, nCookieLen, nEnd;
  var i = 0, j;
  nArgLen = strArg.length;
  nCookieLen = document.cookie.length;
  if(nCookieLen > 0){
    while(i < nCookieLen){
      j = i + nArgLen;
      if(document.cookie.substring(i, j) == strArg){
        nEnd = document.cookie.indexOf (";", j);
        if(nEnd == -1) nEnd = document.cookie.length;
        return unescape(document.cookie.substring(j, nEnd));
      }
      i = document.cookie.indexOf(" ", i) + 1;
      if (i == 0) break;
    }
  }
  return("");
}

