//jspnewhostip = "/ccsw";
var 
  jspnewhostip = "http://www.maxatx.com:8080/ccsw";
  aspnewhostip = "http://www.maxatx.com/asprpt";
  netnewhostip = "http://www.maxatx.com/maxreportdemo";  
  
var PrevWin = null; 
var isHtml = false;

function newopen(URL,Tag) {
  if (PrevWin && !PrevWin.closed) PrevWin.close(); 
  if (Tag == 1) 
   newurl = jspnewhostip + URL
  else if (Tag == 2)
   newurl = aspnewhostip + URL
  else if (Tag == 3)
   newurl = netnewhostip + URL;
   
   //newurl="http://www.maxatx.com/error.html"
   //newurl="http://www.ccsw.com.cn/error.html"
  
   PrevWin = open(newurl,'PrevWin','top=0,left=0,status=yes,menubar=no,scrollbars=yes,top=0,left=0,width=800,height=600,resizable'); 
  return false;
}  

function SelViewerHtml(selvalue)
{
	isHtml = selvalue;
}

function viewerReport(Params,Tag)
{
	 
  if (PrevWin && !PrevWin.closed) PrevWin.close(); 
  
  var ServerUrl = "/sysreport/";
  if (isHtml)
  {
   if (Params.indexOf("Sys_O") < 0) 
    ServerUrl = ServerUrl + "ReportHtmlView"
   else
    ServerUrl = ServerUrl + "ReportEngineView";	
  } 
  else
   ServerUrl = ServerUrl + "ReportEngineView";	

  if (Tag == 1) 
   newurl = jspnewhostip + ServerUrl + ".jsp"
  else if (Tag == 2) {
   ServerUrl = "/sysreport/ReportEngineView";	
   newurl = aspnewhostip + ServerUrl + ".asp"
  }  
  else if (Tag == 3) {
   ServerUrl = "/sysreport/ReportEngineView";		
   newurl = netnewhostip + ServerUrl + ".aspx";
  } 
   
 
  newurl = newurl + Params; 
   
   PrevWin = open(newurl,'PrevWin','top=0,left=0,status=yes,menubar=no,scrollbars=yes,top=0,left=0,width=800,height=600,resizable'); 
  return false;
	
}

function newimage(iamgename,pagename)
{
 iamgename.src = jspnewhostip + "/count/pagecount.jsp?pagename=" + pagename;
 return false;
}

function newdownlaod(imdowan,pagename)
{
 imdowan.location = jspnewhostip + "/count/pagecount.jsp?pagename=" + pagename;
 return false;
}
