
//-------------- °øÅë »ç¿ë ------------------------------------
function viewFlash(url, width, height, temp)
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+width+'" height="'+height+'">');
	document.write('	<param name="movie" value="'+url+'">');
	document.write('	<param name="quality" value="high"><param name="menu" value="false"><param name="wmode" value="transparent">'+temp);
	document.write('	<embed src="'+url+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed>');
	document.write('</object>');
}

var dragapproved=false
var minrestore=0
var initialwidth,initialheightvar
var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all

function setCookie2( name, value ) { document.cookie = name + '=' + escape( value ) + '; path=/; ' }
function iecompattest(){
    return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function drag_drop(e){
    if (ie5&&dragapproved&&event.button==1){
        document.getElementById("dwindow").style.left=tempx+event.clientX-offsetx+"px"
        document.getElementById("dwindow").style.top=tempy+event.clientY-offsety+"px"
    }
    else if (ns6&&dragapproved){
        document.getElementById("dwindow").style.left=tempx+e.clientX-offsetx+"px"
        document.getElementById("dwindow").style.top=tempy+e.clientY-offsety+"px"
    }
}

function initializedrag(e){
    offsetx=ie5? event.clientX : e.clientX
    offsety=ie5? event.clientY : e.clientY
    document.getElementById("dwindowcontent").style.display="none" //extra
    tempx=parseInt(document.getElementById("dwindow").style.left)
    tempy=parseInt(document.getElementById("dwindow").style.top)

    dragapproved=true
    document.getElementById("dwindow").onmousemove=drag_drop
}

function loadwindow(url){
    if(minrestore == 0) { width=212; height=206; minrestore = 1; } else { width=315; height=406; minrestore = 0; url=url+'?Win_1=2';}
    if (!ie5&&!ns6)
        window.open(url,"","width=width,height=height,scrollbars=1")
    else{
        document.getElementById("dwindow").style.display=''
        document.getElementById("dwindow").style.width=initialwidth=width+"px"
        document.getElementById("dwindow").style.height=initialheight=height+"px"
        document.getElementById("dwindow").style.left=document.body.clientWidth-width-30
        document.getElementById("dwindow").style.top=ns6? window.pageYOffset*1+30+"px" : iecompattest().scrollTop*1+30+"px"
        document.getElementById("cframe").src=url
    }
    setCookie2( "screnOn", "on")
}

function maximize(width,height){
    if (minrestore==0){
        minrestore=1 //maximize window
        document.getElementById("maxname").setAttribute("src","/_image/win_1.gif")
        document.getElementById("dwindow").style.width=eval(width+80)+"px"
        document.getElementById("dwindow").style.height=eval(height+70)+"px"
    }
    else{
        minrestore=0 //restore window
        document.getElementById("maxname").setAttribute("src","/_image/win_2.gif")
        document.getElementById("dwindow").style.width=initialwidth
        document.getElementById("dwindow").style.height=initialheight
    }
}

function closeit(){
    document.getElementById("dwindow").style.display="none"
    setCookie2( "screnOn", "off");
}

function stopdrag(){
    dragapproved=false;
    document.getElementById("dwindow").onmousemove=null;
    document.getElementById("dwindowcontent").style.display="" //extra
}

function change(form){
  if (form.url.selectedIndex !=0)
  parent.location = form.url.options[form.url.selectedIndex].value }
 function setCookie( name, value, expiredays ) {
        var todayDate = new Date();
        todayDate.setDate( todayDate.getDate() + expiredays );
        document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" }
 function getCookie( name ) {
        var nameOfCookie = name + "=";
        var x = 0;
        while ( x <= document.cookie.length )
        {
                var y = (x+nameOfCookie.length);
                if ( document.cookie.substring( x, y ) == nameOfCookie ) {
                        if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
                                endOfCookie = document.cookie.length;
                        return unescape( document.cookie.substring( y, endOfCookie ) );
                }
                x = document.cookie.indexOf( " ", x ) + 1;
                if ( x == 0 )
                        break;
        }
        return "";
}

