//self.moveTo(0,0)
//self.resizeTo(screen.availWidth,screen.availHeight)
//self.focus();
function isDefined(property) {
  return (typeof property != 'undefined');
}

var flashVersion = 0;
function getFlashVersion() {
	var latestFlashVersion = 15;
   var agent = navigator.userAgent.toLowerCase(); 
	
   // NS3 needs flashVersion to be a local variable
   if (agent.indexOf("mozilla/3") != -1 && agent.indexOf("msie") == -1) {
      flashVersion = 0;
   }
   
	// NS3+, Opera3+, IE5+ Mac (support plugin array):  check for Flash plugin in plugin array
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		var flashPlugin = navigator.plugins['Shockwave Flash'];
		if (typeof flashPlugin == 'object') { 
			for (var i = latestFlashVersion; i >= 3; i--) {
            if (flashPlugin.description.indexOf(i + '.') != -1) {
               flashVersion = i;
               break;
            }
         }
		}
	}

	// IE4+ Win32:  attempt to create an ActiveX object using VBScript
	else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
	   var doc = '<scr' + 'ipt language="VBScript"\> \n';
      doc += 'On Error Resume Next \n';
      doc += 'Dim obFlash \n';
      doc += 'For i = ' + latestFlashVersion + ' To 3 Step -1 \n';
      doc += '   Set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash." & i) \n';
      doc += '   If IsObject(obFlash) Then \n';
      doc += '      flashVersion = i \n';
      doc += '      Exit For \n';
      doc += '   End If \n';
      doc += 'Next \n';
      doc += '</scr' + 'ipt\> \n';
      document.write(doc);
   }
		
	// WebTV 2.5 supports flash 3
	else if (agent.indexOf("webtv/2.5") != -1) flashVersion = 3;

	// older WebTV supports flash 2
	else if (agent.indexOf("webtv") != -1) flashVersion = 2;

	// Can't detect in all other cases
	else {
		flashVersion = flashVersion_DONTKNOW;
	}

	return flashVersion;
}

flashVersion_DONTKNOW = -1;

			if (self != top) {top.location=self.location;}
            var requiredVersion = 5;
            var flashVersion = getFlashVersion();
            
            if (flashVersion >= requiredVersion) {
               var flash = "Yes";
			   var version = flashVersion;

            }
            else if (flashVersion > 0) {
               var flash = "Yes";
			   var version = flashVersion;
            }
            else if (flashVersion == 0) {
               var flash = "No";
			   var version = flashVersion;
            }
            else if (flashVersion == flashVersion_DONTKNOW || flashVersion == null) {
               var flash = "Undetectable";
			   var version = flashVersion;
            }
v3 = 0; op = 0; ie4  = 0; ie5 = 0; nn4 = 0; nn6 = 0; ie7 = 0;
isMac = 0; aol = 0;
if(document.images){
    if(navigator.userAgent.indexOf("Opera") != -1){
        op = 1;
    } else {
        if(navigator.userAgent.indexOf("AOL") != -1){
            aol = 1;
        } else {
            ie4 = (document.all && !document.getElementById);
            nn4 = (document.layers);
            ie5 = (document.all && document.getElementById);
            nn6 = (document.addEventListener);
			if (typeof document.addEventListener != 'function') {ie7 = 'yes';}
        }
    }
} else {
    v3 = 1;	
}
if(navigator.userAgent.indexOf("Mac") != -1){
    isMac = 1;
}
if(op){ // do this
    var navi ="Opera";
} 
if(ie4){ // do this
    var navi = "IE4";
} 
if(ie5){ // do this
    var navi = "IE5";
} 
if(ie7){ // do this
    var navi = "IE6>";
} 
if(nn4){ // do this
    var navi = "NS4";
} 
if(nn6){ // do this
    var navi = "NS6";
} 
if(aol){ // do this
    var navi = "Unknown";
}
if(v3){ // do this
    var navi = "Unknown";
}
var OSName="Unknown";
if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS";
if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX";
if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux";
//opera Netscape 6 Netscape 4x Mozilla 
if (window.innerWidth || window.innerHeight){ 
docwidth = window.innerWidth; 
docheight = window.innerHeight; 
} 
//IE Mozilla 
if (document.body.clientWidth || document.body.clientHeight){ 
docwidth = document.body.clientWidth; 
docheight = document.body.clientHeight; 
}
screenwidth = screen.width;
screenheight = screen.height;
num_colors = screen.colorDepth + " bit";
function SendDataToMysql() {
var foo1 = docwidth;
var foo2 = docheight;
var foo3 = screenwidth;
var foo4 = screenheight;
var foo5 = num_colors;
var foo6 = "ip";
var foo7 = OSName;
var foo8 = navi;
document.write("<img width='1' height='1' src='include/UserDataStatestikReciver.php?foo1=" + foo1 + "&foo2=" + foo2 + "&foo3=" + foo3 + "&foo4=" + foo4 + "&foo5=" + foo5 + "&foo6=" + foo6 + "&foo7=" + foo7 + "&foo8=" + foo8 + "&flash=" + flash +"&version=" + version + "'>");
}