function changeStudio(v){
    if(v!=0){ 
        document.studio.submit();
    }
}

function changeDate(){
        document.studio.submit();
}




//PopModel
var everlay_info = {
      click_on_everlay_info_hide: false,
      show_loading_image: true, //true
      loading_image: "img/loading.gif",
      $: function(id){
            return document.getElementById(id);
      },
      init: function(){
		/*  if( typeof( window.innerWidth ) == 'number' ) {
				//Non-IE
				var myDivHeight = window.innerHeight+ window.scrollMaxY;
		  }else{
				var myDivHeight =document.documentElement.clientHeight;
				myDivHeight+=document.body.scrollHeight; 
				alert(myDivHeight);
		  }
		  */

 
var scnWid,scnHei;
	if (self.innerHeight) // all except Explorer
	{
		scnWid = self.innerWidth;
		scnHei = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		scnWid = document.documentElement.clientWidth;
		scnHei = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		scnWid = document.body.clientWidth;
		scnHei = document.body.clientHeight;
	}
//alert('This is Height : '+scnHei);
		myDivHeight=scnHei;
 


            var ol_div = document.createElement("div");
            ol_div.id = "everlay_info";
			ol_div.style.height=myDivHeight;
            ol_div.style.display = "none";
            ol_div.onclick = (this.click_on_everlay_info_hide)? everlay_info.hide : null;
            if(this.show_loading_image){
                  var l_img = document.createElement("img");
                  l_img.src = this.loading_image;
                  l_img.style.position = "absolute";
                  l_img.style.top = (((window.innerHeight)? window.innerHeight : document.body.clientHeight) / 2) + "px";
                  l_img.style.left = (((window.innerWidth)? window.innerWidth : document.body.clientWidth) / 2) + "px";

                  ol_div.appendChild(l_img);
            }
            document.body.appendChild(ol_div);
      },
      show: function(){
			//Hutch 12.13 Fix IE6
			for (var i_tem = 0; i_tem < document.getElementsByTagName('select').length; i_tem++)
			document.getElementsByTagName('select')[i_tem].style.visibility='hidden';
			//End Hutch
            if(this.$("everlay_info")){
				var myW=450/2;
				var myH=450/2;
			    //this.$("content_info").style.top =  (((window.innerHeight)? window.innerHeight : document.body.clientHeight) / 2)-myH  ;
				this.$("content_info").style.top = "100px"  ;
 				this.$("content_info").style.left =  (getWindowSize("w")/ 2)-myW+"px" ;
                this.$("everlay_info").style.display = "";
				this.$("content_info").style.display="";
             }
			//document.body.style.overflow = 'hidden';
			//document.body.scroll="no";
      },
    

      hide: function(){
			//document.body.style.overflow = 'hidden';
			//document.body.scroll="yes";
			//Hutch 12.13 Fix IE6
			for (var i_tem = 0; i_tem < document.getElementsByTagName('select').length; i_tem++)
			document.getElementsByTagName('select')[i_tem].style.visibility='';
			//End Hutch
            if(everlay_info.$("everlay_info")){
                  everlay_info.$("everlay_info").style.display = "none";
				  everlay_info.$("content_info").style.display = "none";
            }
      }
}

if(!document.all){
function fixedIE(tl, n, el){
var sc = 'scroll'+tl, d = document, c = 'compatMode',
b = d[c]&&d[c]=='CSS1Compat'? d.documentElement : d.body;
n = n-0; if(typeof n!='number')return 0;
if(/^(Top|Left)$/.test(tl))
return b[sc]+n+'px';
if(/^(Bottom|Right)$/.test(tl)&&typeof el=='object'){
tl = tl=='Right'? 'Left' : 'Top', sc = 'scroll'+tl;
var dim = 'client' + (tl=='Top'? 'Height' : 'Width');
return b[sc]+b[dim]-el[dim]-n+'px';
}
return 0;
}
}

var browser=navigator.appName;
var b_version=navigator.appVersion;
var version=parseFloat(b_version);


function getIEVersionNumber() {
    var ua = navigator.userAgent;
    var MSIEOffset = ua.indexOf("MSIE ");
    
    if (MSIEOffset == -1) {
        return 0;
    } else {
        return parseFloat(ua.substring(MSIEOffset + 5, ua.indexOf(";", MSIEOffset)));
    }
}

var isIE6Min = getIEVersionNumber() <= 6;

 
 

//Show
function showInfo(id){
    if((browser=="Microsoft Internet Explorer")&&(isIE6Min)){
        makeRequest('showInfo','summary.php','?id='+id,'classInfo','img/loading.gif','<div>Loading...</div>');
        TagToTip('classInfo', TITLE, 'Class Info',  SHADOW, true, STICKY, 1, CLOSEBTN, true, CLICKCLOSE, false);
    }else{
        makeRequest('showInfo','summary.php','?id='+id,'info','img/loading.gif','<div>Loading...</div>');
        everlay_info.init();
        everlay_info.show();
    }
}


 function getWindowSize(type) {
   var myWidth = 0, myHeight = 0;
   if( typeof( window.innerWidth ) == 'number' ) {
     //Non-IE
     myWidth = window.innerWidth;
     myHeight = window.innerHeight;
   } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
     //IE 6+ in 'standards compliant mode'
     myWidth = document.documentElement.clientWidth;
     myHeight = document.documentElement.clientHeight;
   } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
     //IE 4 compatible
     myWidth = document.body.clientWidth;
     myHeight = document.body.clientHeight;
   }

   if(type=="w"){
       // window.alert( 'Width = ' + myWidth);
       return myWidth;
   }else{
        //window.alert( 'Height = ' + myHeight);
        return myHeight;
   }
 }


//à»Ô´ Popup
function OpenDialog(url,name,w,h)
{
    //window.showModalDialog(url,'add','center:yes;resizable:no;status:no;dialogWidth:450px;dialogHeight:380px;');
	NewWindow(url,name,w,h,"center","front");
}

var win=null;
function NewWindow(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){myleft=0;mytop=20}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes";win=window.open(mypage,myname,settings);
win.focus();}
 
