// script.js
// modified by Mike Bell, 25/9/03
// then modified by Sergey Starkov 9/26/03
// then modified by John Cook 12/01/2003
// then again modified by Sergey Starkov 12/03/2003
// modified 24/2/04, Mike - elementool 1239

document.write('<META HTTP-EQUIV="Expires" CONTENT="-1">');
document.write('<META HTTP-EQUIV="imagetoolbar" CONTENT="no">');
document.write("<link rel='stylesheet' href='/"+dbsource+"/configuration/conf/$FILE/ew.css'>");

/**************************************************************
 * stripSpecialCharacters
 **************************************************************/
function stripSpecialCharacters(name) {
	var re = /[\x3A\x2D\x2E]/g   // match any of ':', '-' or '.' repeatedly
	return name.replace(re, ''); // delete them
}

/**************************************************************
 * Win
 **************************************************************/
function Win(url,winname,w2,h2,p1,p2,p3,p4,p5){
   w1 = (window.screen.width/2) - ((w2/2) + (w2/58));
   h1 = (window.screen.height/2) - (h2/2 + (h2/14));

   params  = "width="+w2+",";
   params += "height="+h2+",";
   params += "toolbar="+p5+",";
   params += "location="+p1+",";
   params += "directories=0,";
   params += "status=0,";
   params += "menubar="+p2+",";
   params += "scrollbars="+p3+",";
   params += "resizable="+p4+",";
   params += "left="+w1+",";
   params += "top="+h1+"";

   if(winname) winname = stripSpecialCharacters(winname);

   win = window.open(url, winname, params, w2, h2, p1, p2, p3, p4, p5);

   try {
      win.focus();
      throw "GoOd";
   }
   catch(TheError) {
      if(TheError != "GoOd") alert("We have detected that you have\nPOP-UP blocking software installed")
   }
   //win.resizeTo(w2,h2);
}

/**************************************************************
 * Refresh
 **************************************************************/
function ReFresh(){ setTimeout("DoIt();", 200); }

/**************************************************************
 * DoIt
  **************************************************************/
function DoIt(){ window.location = window.location; }

/**************************************************************
 * MakeBullet
 **************************************************************/
function MakeBullet(){ document.forms(0).cComments.value=(document.forms(0).cComments.value)+(document.forms(0).bulletcode.value),document.forms(0).cComments.focus() }

/**************************************************************
 * Close All Child Windows
 **************************************************************/
function checkParentWin(){
	try {
   		if(window.opener != null) {
      		if(window.opener.closed) {
         		if((self.name != "login") && (self.name != "site1x")&& (self.name != "diligentWin")) self.close();
      		}
      		else setTimeout("checkParentWin()",333);
   		}
   	}
	catch(Error)
	{}
}
if(window.opener != null) setTimeout("checkParentWin()",333);
