
var useAcrobat = navigator.mimeTypes && navigator.mimeTypes["application/pdf"];
var useFlash = navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;

var good ='yes';
var isInstalled = false; 
var version = null;   
if (window.ActiveXObject) {   
    var control = null;   
    try {   
        // AcroPDF.PDF is used by version 7 and later   
        control = new ActiveXObject('AcroPDF.PDF');   
    } catch (e) {   
        // Do nothing   
    }   
    if (!control) {   
        try {   
            // PDF.PdfCtrl is used by version 6 and earlier   
            control = new ActiveXObject('PDF.PdfCtrl');   
        } catch (e) {   
           useAcrobat = '';
        }   
    }   
    if (control) {   
        isInstalled = true;   
		useAcrobat = 'true';
        version = control.GetVersions().split(',');   
        version = version[0].split('=');   
        version = parseFloat(version[1]);   
    }   
} else {   
    // Check navigator.plugins for "Adobe Acrobat" or "Adobe PDF Plug-in"*   
}  

var version = null;   
if (window.ActiveXObject) {   
    var control = null;   
    try {   
        control = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');   
    } catch (e) {   
        useFlash = '';

    }   
    if (control) {   
        isInstalled = true;   
		useFlash = 'true';
        version = control.GetVariable('$version').substring(4);   
        version = version.split(',');   
        version = parseFloat(version[0] + '.' + version[1]);   
    }   
} else {   
    // Check navigator.plugins for "Shockwave Flash"   
}  




var mydisplay = new Object()

if (useAcrobat){
	SetCookie('PDF','yes','0');
	}
if (!useAcrobat){
	SetCookie('PDF','no','0');
	}
if (useFlash){
	SetCookie('Flash','yes','0');
	}
if (!useFlash){
	SetCookie('Flash','no','0');
	}
var currentTime = new Date()
var month = currentTime.getMonth() + 1
var day = currentTime.getDate()
var year = currentTime.getFullYear()

var favorite = GetCookie ('Pop');
var ADSpilt='';
if (favorite){
	var ADSpilt = favorite.split("^");
	if (ADSpilt[0] == 'no'){
		var ans ="yes^"+year+month+day+"^";
		SetCookie2('Pop',ans,'0');
	}
	}
if (!favorite){
	var ans ="no^"+year+month+day+"^";
	SetCookie2('Pop',ans,'0');
	}






function SetCookie(cookieName,cookieValue,nDays) {
 var today = new Date();
 var expire = new Date();
 if (nDays==null || nDays==0) nDays=1;
 expire.setTime(today.getTime() + 3600000*24*nDays);
 document.cookie = cookieName+"="+cookieValue + "; path=/; domain=bigsys.com; expires="+expire.toGMTString();
}

function SetCookie2(cookieName,cookieValue,nDays) {
 var today = new Date();
 var expire = new Date();
 if (nDays==null || nDays==0) nDays=12;   // number of hours
 expire.setTime(today.getTime() + 3600000*nDays);
 document.cookie = cookieName+"="+cookieValue + "; path=/; domain=bigsys.com; expires="+expire.toGMTString();
}


function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}

function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
