﻿
  
   function getgetaddsubjectcomm()
   {  
    openwin.getWin(); 
   }
 


//科目新增
    var openwin = {};
   openwin.getWin = function(){
 
       var obj = $("#open");
    var openWindow ;
//       //是否已经新开窗口
        if(obj.html() != "" ){
        document.getElementById("newWindow").parentNode.removeChild(document.getElementById("newWindow")); //删除
        
            openWindow = $("#newWindow");//存在窗口
           openWindow.slideToggle("closed");//显示效果
       } 
          //模拟弹出窗口样式
          
          openWindow="";
           openWindow = $(openwin.getHtml());//不存在窗口
           //定义CSS样式 模拟关键 自定义设置CSS样式 
		 
 
          	 openWindow.css({
		       'float':'left',
		       'left':'310',
               'font-size':'12px',
               'position':'absolute', 
               'top':'245',
			   'display':'inline', 
               'width':'200px',
               'background-color':'#f0f5FF',
               'border': '1px solid #000',
               'z-index': '1',
               'padding-bottom':'30px',
               	'font-family':'Arial'
           });
       
           openWindow.appendTo($("#open"));
 
       //绑定单击事件 确定
       openWindow.find("#show").click(function(){ 
           openwin.showWindow();
       }).end();
       //绑定单击事件 关闭
       openWindow.find("#closed").click(function(){ 
           openwin.closeWindow();
       }).end();
   }
   
  
   
    //获取窗口页面元素 模拟窗口
   openwin.getHtml = function(){
    //自定义页面元素，样式，大小等
     
       html  = '<div id="newWindow">'; 
       html += '<p style="text-align:right;" id="showclosed"><a id="show"  onmouseover="this.style.cursor=\'pointer\'" style="margin-left:5px; display:inline;"></a> <a onmouseover="this.style.cursor=\'pointer\'" style="margin-left:3px; display:inline;" id="closed">close</a></p>';
       html += '<p style="text-align:center;">under construction</p>';
       html += '<p style="text-align:center;"><img src="Images/UnderConstruction.gif" /></p>';
       
       html += '</div>';
         return html;
       
      
   }
   //确认事件
   openwin.showWindow = function(){ 
   var Randomyz=document.getElementById("Randomyz").value;
    
             $("#newWindow").hide();
                
  }
   //关闭事件
   openwin.closeWindow = function(){
       $("#newWindow").hide();
   }
    