function page_popup(filename)
{
  var mywin;
   W = 600;
   H  = 720;
   var myW = W ? W : screen.availWidth;
   var myH = H ? H : screen.availHeight;
   mywin = window.open(filename,"",'width='+myW+',height='+myH+', top=2,left=2,scrollbars=yes');
   mywin.resizeTo(myW,myH);
}

function page_popup2(filename)
{
  var mywin;
   W = 585;
   H  = 500;
   var myW = W ? W : screen.availWidth;
   var myH = H ? H : screen.availHeight;
   mywin = window.open(filename,"",'width='+myW+',height='+myH+', top=2,left=2,scrollbars=yes');
   mywin.resizeTo(myW,myH);
}






var bee = new BrowserCheck
var abee = new BrowserDetectLite

var page_content;

			if (bee.b == "ie" && bee.os == "win") 
			{
					page_content = "<DIV id=cpage name=cpage STYLE=\"position: relative;  height: 343px;  width: 689px; scrollbar-arrow-color: 0950A0;  scrollbar-base-color: 9AB4D9; scrollbar-dark-shadow-color: 9AB4D9; scrollbar-track-color: 93AED9; scrollbar-face-color: 9AB4D9; scrollbar-shadow-color: 88A8D1; scrollbar-highlight-color: 9AB4D9; scrollbar-3d-light-color: 9AB4D9; overflow-y: scroll;\">";
			}
			if (abee.isNS == true && bee.os == "win") 
			{
					page_content = "&nbsp;<DIV id=cpage name=cpage STYLE=\"position: absolute;  top: 197px; left: 206px; height: 343px;  width: 669px; scrollbar-arrow-color: 0950A0;  scrollbar-base-color: 9AB4D9; scrollbar-dark-shadow-color: 9AB4D9; scrollbar-track-color: 93AED9; scrollbar-face-color: 9AB4D9; scrollbar-shadow-color: 88A8D1; scrollbar-highlight-color: 9AB4D9; scrollbar-3d-light-color: 9AB4D9; overflow: scroll;\">";
			}
			if (abee.isMozilla == true && bee.os == "win") 
			{
					page_content = "<DIV id=cpage name=cpage STYLE=\"position: relative;  height: 333px;  width: 689px; scrollbar-arrow-color: 0950A0;  scrollbar-base-color: 9AB4D9; scrollbar-dark-shadow-color: 9AB4D9; scrollbar-track-color: 93AED9; scrollbar-face-color: 9AB4D9; scrollbar-shadow-color: 88A8D1; scrollbar-highlight-color: 9AB4D9; scrollbar-3d-light-color: 9AB4D9; overflow: scroll;\">";
			}
 

function BrowserCheck() {
	var b = navigator.appName;
	if (b=="Netscape") this.b = "ns";
	else if (b=="Microsoft Internet Explorer") this.b = "ie";
	else this.b = b;
	this.version = navigator.appVersion
	this.v = parseInt(this.version);
	this.ns = (this.b=="ns" && this.v>=4);
	this.ns4 = (this.b=="ns" && this.v==4);
	this.ns5 = (this.b=="ns" && this.v==5);
	this.ie = (this.b=="ie" && this.v>=4);
	this.ie4 = (navigator.userAgent.indexOf('MSIE 4')>0);
	this.ie5 = (navigator.userAgent.indexOf('MSIE 5')>0);
	if (this.ie5) this.v = 5;
	this.min = (this.ns||this.ie);
  this.win = (this.version.indexOf('Win')>0);
  this.mac = (this.version.indexOf('Mac')>0);

  if (this.win == true)  this.os = "win";
  if (this.mac == true)  this.os = "mac";

}

var agt=navigator.userAgent.toLowerCase();
var ie = (agt.indexOf("msie") != -1);
var ns = (navigator.appName.indexOf("Netscape") != -1);
var win = ((agt.indexOf("win")!=-1) || (agt.indexOf("32bit")!=-1));
var mac = (agt.indexOf("mac")!=-1);

if (ie && win) { pluginlist = detectIE("Adobe.SVGCtl","SVG Viewer") + detectIE("SWCtl.SWCtl.1","Shockwave Director") + detectIE("ShockwaveFlash.ShockwaveFlash.1","Shockwave Flash") + detectIE("rmocx.RealPlayer G2 Control.1","RealPlayer") + detectIE("QuickTimeCheckObject.QuickTimeCheck.1","QuickTime") + detectIE("MediaPlayer.MediaPlayer.1","Windows Media Player") + detectIE("PDF.PdfCtrl.5","Acrobat Reader"); }

if (win) 
{
	 if (pluginlist.indexOf("Flash")==-1)
	 {
		if(confirm("You PC don't have Flash Plug-in, if you want to Install Flash Press 'OK'")) { alert("Flash Plug-in Installing it might take 3 to 5 min, Please wait and press 'OK' to continue") }
	 }
}

function detectIE(ClassID,name) { result = false; document.write('<SCRIPT LANGUAGE=VBScript>\n on error resume next \n result = IsObject(CreateObject("' + ClassID + '"))</SCRIPT>\n'); if (result) return name+','; else return ''; }
function detectNS(ClassID,name) { n = ""; if (nse.indexOf(ClassID) != -1) if (navigator.mimeTypes[ClassID].enabledPlugin != null) n = name+","; return n; }

pluginlist += navigator.javaEnabled() ? "Java," : "";
if (pluginlist.length > 0) pluginlist = pluginlist.substring(0,pluginlist.length-1);




function BrowserDetectLite() {
	var ua = navigator.userAgent.toLowerCase();

	// browser name
	this.isGecko     = (ua.indexOf('gecko') != -1);
	this.isNS        = ( (this.isGecko) && (ua.indexOf('netscape') != -1)  );
	this.isMozilla   = (this.isGecko && ua.indexOf("firefox") != -1);
	this.isIE        = ( (ua.indexOf("msie") != -1) && (ua.indexOf("opera") == -1) && (ua.indexOf("webtv") == -1) );
	this.isOpera     = (ua.indexOf("opera") != -1);
	this.isKonqueror = (ua.indexOf("konqueror") != -1);
	this.isIcab      = (ua.indexOf("icab") != -1);
	this.isAol       = (ua.indexOf("aol") != -1);
	this.isWebtv     = (ua.indexOf("webtv") != -1);

	// spoofing and compatible browsers
	this.isIECompatible = ( (ua.indexOf("msie") != -1) && !this.isIE);
	this.isNSCompatible = ( (ua.indexOf("mozilla") != -1) && !this.isNS && !this.isMozilla);

	// browser version
	this.versionMinor = parseFloat(navigator.appVersion);

	// correct version number
	if (this.isNS && this.isGecko) {
		this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('/') + 1 ) );
	}
	else if (this.isIE && this.versionMinor >= 4) {
		this.versionMinor = parseFloat( ua.substring( ua.indexOf('msie ') + 5 ) );
	}
	else if (this.isMozilla) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('rv:') + 3 ) );
   }
   else if (this.isOpera) {
		if (ua.indexOf('opera/') != -1) {
			this.versionMinor = parseFloat( ua.substring( ua.indexOf('opera/') + 6 ) );
		}
		else {
			this.versionMinor = parseFloat( ua.substring( ua.indexOf('opera ') + 6 ) );
		}
	}
	else if (this.isKonqueror) {
		this.versionMinor = parseFloat( ua.substring( ua.indexOf('konqueror/') + 10 ) );
	}
	else if (this.isIcab) {
		if (ua.indexOf('icab/') != -1) {
			this.versionMinor = parseFloat( ua.substring( ua.indexOf('icab/') + 6 ) );
		}
		else {
			this.versionMinor = parseFloat( ua.substring( ua.indexOf('icab ') + 6 ) );
		}
	}
	else if (this.isWebtv) {
		this.versionMinor = parseFloat( ua.substring( ua.indexOf('webtv/') + 6 ) );
	}

	this.versionMajor = parseInt(this.versionMinor);
	this.geckoVersion = ( (this.isGecko) ? ua.substring( (ua.lastIndexOf('gecko/') + 6), (ua.lastIndexOf('gecko/') + 14) ) : -1 );

	// dom support
   this.isDOM1 = (document.getElementById);
	this.isDOM2Event = (document.addEventListener && document.removeEventListener);

   // css compatibility mode
   this.mode = document.compatMode ? document.compatMode : 'BackCompat';

	// platform
	this.isWin   = (ua.indexOf('win') != -1);
	this.isWin32 = (this.isWin && ( ua.indexOf('95') != -1 || ua.indexOf('98') != -1 || ua.indexOf('nt') != -1 || ua.indexOf('win32') != -1 || ua.indexOf('32bit') != -1 || ua.indexOf('xp') != -1) );
	this.isMac   = (ua.indexOf('mac') != -1);
	this.isUnix  = (ua.indexOf('unix') != -1 || ua.indexOf('linux') != -1 || ua.indexOf('sunos') != -1 || ua.indexOf('bsd') != -1 || ua.indexOf('x11') != -1)

	// specific browser shortcuts
	this.isNS4x = (this.isNS && this.versionMajor == 4);
	this.isNS40x = (this.isNS4x && this.versionMinor < 4.5);
	this.isNS47x = (this.isNS4x && this.versionMinor >= 4.7);
	this.isNS4up = (this.isNS && this.versionMinor >= 4);
	this.isNS6x = (this.isNS && this.versionMajor == 6);
	this.isNS6up = (this.isNS && this.versionMajor >= 6);
	this.isNS7x = (this.isNS && this.versionMajor == 7);
	this.isNS7up = (this.isNS && this.versionMajor >= 7);

	this.isIE4x = (this.isIE && this.versionMajor == 4);
	this.isIE4up = (this.isIE && this.versionMajor >= 4);
	this.isIE5x = (this.isIE && this.versionMajor == 5);
	this.isIE55 = (this.isIE && this.versionMinor == 5.5);
	this.isIE5up = (this.isIE && this.versionMajor >= 5);
	this.isIE6x = (this.isIE && this.versionMajor == 6);
	this.isIE6up = (this.isIE && this.versionMajor >= 6);

	this.isIE4xMac = (this.isIE4x && this.isMac);
}
