﻿function loadXML(id,url){
	var req;
	function loadXMLDoc(url) {
		req = false;
    	if(window.XMLHttpRequest && !(window.ActiveXObject)) {
	    	try {
				req = new XMLHttpRequest();
	        } catch(e) {
				req = false;
	        }
	    	} else if(window.ActiveXObject) {
	       		try {
	        		req = new ActiveXObject("Microsoft.XMLHTTP");
	      		} catch(e) {
	        	try {
	          		req = new ActiveXObject("Microsoft.XMLHTTP");
	        	} catch(e) {
	          		req = false;
	        	}
			}
    	}
		if(req) {
			req.onreadystatechange = processReqChange;
			req.open("GET", url,true);
			req.send("");
		}	
	}
	function processReqChange() {
   		if (req.readyState == 4) {
       		if (req.status == 200) {
          			document.getElementById(id).innerHTML=req.responseText;
        		} else {
        		}
  			 }
	}
	loadXMLDoc(url);
}

 function DisplayCourse(cellControlId)
       {
         var width = 880;
         var height = 600;
         var top = (screen.height - height) / 2;
         var left = (screen.width - width) / 2;
         url = '/public/courseshow.aspx?course='+cellControlId;
         window.open(url,"CourseInfo","width=" + width + ", height=" + height + ", top=" + top + ", left=" + left + ", toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no");
       }
       
       
      function DisplayViewVideo(cellControlId)
        {
              var width = 880;
              var height = 600;
              var top = (screen.height - height) / 2;
              var left = (screen.width - width) / 2;
              url = '/freeclass/specialist.aspx?cid='+cellControlId;
              window.open(url,"CourseInfo","width=" + width + ", height=" + height + ", top=" + top + ", left=" + left + ", toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no");
             // OpenDialogHelper.openModalDlg(url, {mode : "new"}, width, height);            
        }