<!--
// Globals
// Major version of Flash required


  var litrals = new Array();
            litrals["vcopious.title.systemCheck"]="System Check";
litrals["vcopious.system.req.column.title"]="System Requirements";
litrals["vcopious.button.testAgain"]="Check Again";
litrals["vcopious.system.config.enabled"]="Enabled";
litrals["vcopious.system.info.browser"]="Browser Installations";
litrals["vcopious.system.test.os.combo"]="OS / Browser Combination";
litrals["vcopious.system.req.browser.fx"]="Firefox";
litrals["vcopious.system.info.flashPlayer"]="Download Flash Player";
litrals["vcopious.system.config.access.fail"]="Proxy/Firewall prohibited";
litrals["vcopious.text.message.information"]="Information:";
litrals["vcopious.system.req.access"]="Proxy and Firewall permissions open";
litrals["vcopious.text.download"]="{0} Download";
litrals["vcopious.system.test.resolution"]="Screen Resolution";
litrals["vcopious.system.config.notInstalled"]="Not Installed";
litrals["vcopious.system.config.supported"]="Supported";
litrals["vcopious.system.test.flash"]="Flash";
litrals["vcopious.text.message.config.failed"]="Your system is not configured to view this event. Please update your system configuration and check again.";
litrals["vcopious.text.message.denotesRequired"]="Denotes Required";
litrals["vcopious.system.info.column.title"]="More Information";
litrals["vcopious.system.req.os.win"]="Windows";
litrals["vcopious.text.with"]="{0} with {1}";
litrals["vcopious.button.continue"]="Continue";
litrals["vcopious.system.config.notSupported"]="Not Supported";
litrals["vcopious.system.info.proxy"]="Proxy Servers & Firewalls";
litrals["vcopious.system.test.column.title"]="Configuration Check";
litrals["vcopious.system.req.os.mac"]="Mac";
litrals["vcopious.text.orHigher"]="{0} or higher";
litrals["vcopious.system.req.flash"]="Flash Player 10.0.0+";
litrals["vcopious.system.req.media.wm"]="Windows Media Player 10.x";
litrals["vcopious.system.test.media.rp"]="Real Player";
litrals["vcopious.system.test.browser"]="Browser";
litrals["vcopious.text.message.criticalError"]="Critical Error:";
litrals["vcopious.system.config.flash"]="Flash Player version";
litrals["vcopious.system.req.browser.sf"]="Safari";
litrals["vcopious.text.kbps"]="{0} Kbps";
litrals["vcopious.system.config.column.title"]="User Configuration";
litrals["vcopious.system.req.media.rp"]="Real Player 10.x";
litrals["vcopious.system.test.media.wm"]="Windows Media Player";
litrals["vcopious.system.config.installed"]="Installed";
litrals["vcopious.system.info.bandwidth"]="Internet Connection Speeds";
litrals["vcopious.system.info.cookies"]="Browser Cookies";
litrals["vcopious.system.req.cookies"]="Supported and enabled";
litrals["vcopious.system.test.access"]="Server Accessibility";
litrals["vcopious.system.config.disabled"]="Disabled";
litrals["vcopious.system.req.browser.ie"]="Internet Explorer";
litrals["vcopious.system.config.access.pass"]="Proxy/Firewall open";
litrals["vcopious.system.info.combo"]="OS and Browser Combinations";
litrals["vcopious.text.message.config.incomplete"]="The optional components below were not detected. You may proceed to the Virtual Show, or install the optional components if desired. Some content items may recommend these components for optimal viewing.";
litrals["vcopious.system.req.os.lnx"]="Linux";
litrals["vcopious.text.unknown"]="{0} unknown";
litrals["vcopious.system.test.cookies"]="Cookies";
litrals["vcopious.system.status.column.title"]="Status";
litrals["vcopious.system.test.bandwidth"]="Bandwidth";

  var locales = new Array();
 locales["en"]="English";
 var flashVariables = "";
function start(){
    // alert(bandwidth);
   //  alert(isFirewall);
        var requiredMajorVersion = 10;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 0;


// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
var hasProductInstall = DetectFlashVer(6, 0, 65);

// Version check based upon the values defined in globals
var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

/*if(!hasValidOSBrowserImpl()){
    document.write(getErrorMessage('browseros'))
} else */
		if ( !hasProductInstall  ) {
    document.write(getErrorMessage('flashnotinstalled'))
} else if ( hasProductInstall && !hasRequestedVersion ) {
    document.write(getErrorMessage('flashnotvalidversion'))
/*var alternateContent =  '<div id="installFlash">This content requires the latest version of Adobe Flash Player. '
   	+ '<a href="http://www.adobe.com/go/getflash/" target="_blank">Get Flash</a></div>';
    document.write(alternateContent);  // insert non-flash content*/
} else if (hasRequestedVersion) {
   
    // if we've detected an acceptable version
    // embed the Flash Content SWF when all tests are passed
	//  alert(document.getElementById("HiddenField1").value);
   flashVariables += "&flashversion=" + GetSwfVer().replace("WIN ", "")
        + "&cookieenabled=" + isCookieEnabledImpl()
         +  "&screenresolution=" + screenWidth + "x" +  screenHeight
 	
 
	
    AC_FL_RunContent(
        "src", 'swfs/VCopiousSystemCheck',
        "FlashVars", flashVariables,
        "width", "1000",
        "height", "600",
        "align", "middle",
        "id", "VirtualTradeshow",
        "quality", "high",
        "bgcolor", "#869ca7",
        "name", "VirtualTradeshow",
        "allowScriptAccess","sameDomain",
        "type", "application/x-shockwave-flash",
        "pluginspage", "http://www.adobe.com/go/getflashplayer",
		"wmode","transparent"
        );
} else {  // flash is too old or we can't detect the plugin
    var alternateContent =  'An error has occured. please contact technical support.';
    document.write(alternateContent);  // insert non-flash content
}
}


function getErrorMessage(code){
    var messageHead= '<div id="mainContent"><div id="pageHeader" class="pageHeader">'+litrals['vcopious.system.test.column.title']+'</div>	<div id="statusMessage" class="message">'+litrals['vcopious.text.message.config.failed']+'</div>	<div id="testResult"><br><table width="100%" cellpadding="0" cellspacing="0" border="1">			<tr class="hStyle"><td class="TYSGridHeaderItem" width="170">'+litrals['vcopious.system.test.column.title']+'</td><td class="TYSGridHeaderItem" width="285">'+litrals['vcopious.system.req.column.title']+'</td><td class="TYSGridHeaderItem" width="195">'+litrals['vcopious.system.config.column.title']+'</td><td class="TYSGridHeaderItem" width="90">'+litrals['vcopious.system.status.column.title']+'</td><td class="TYSGridHeaderItem" width="160">'+litrals['vcopious.system.info.column.title']+'</td></tr>'
    var messageTail="</table><div style='float: right;'><br><br>\n\<input type='button' style='background-color: rgb(68, 68, 68); color: rgb(255, 255, 255);' value='"+litrals['vcopious.button.testAgain']+"' onclick='handleTestAgain()'/></div></div></div>"
    //var messageTail="</table><div><br><br>\n\<input type='button' value='"+litrals['vcopious.button.testAgain']+"' onclick='window.top.location.reload();return false;'/></div></div></div>"
    //var messageTail='</table><div><br><br><input type="button" value="Test Again" onclick="window.top.location.reload()"/></div>	</div></div>'
	
    var messageBody = "";
	
    if(code=='flashnotinstalled'){
        messageBody = '<tr class="rStyle"><td>'+litrals['vcopious.system.test.flash']+'</td><td>'+litrals['vcopious.system.req.flash']+'</td><td>'+litrals['vcopious.system.config.notInstalled']+'</td><td align="center"><img src="images/fail.png"/></td><td><a href="http://www.adobe.com/go/getflashplayer" target="_blank">'+litrals['vcopious.system.info.flashPlayer']+'</a></td></tr>'
    } else if(code=='flashnotvalidversion'){
        messageBody = '<tr class="rStyle"><td>'+litrals['vcopious.system.test.flash']+'</td><td>'+litrals['vcopious.system.req.flash']+'</td><td>'+litrals['vcopious.system.config.flash']+ GetSwfVer().replace("WIN ", "")+'</td><td align="center"><img src="images/fail.png"/></td><td><a href="http://www.adobe.com/go/getflashplayer" target="_blank">'+litrals['vcopious.system.info.flashPlayer']+'</a></td></tr>'
    }
	
    return messageHead + messageBody + messageTail;
}

function handleTestAgain() {
    runTestAgainImpl();
}





var reloadCalled = false;
function runTestAgainImpl(locale){
    if(reloadCalled) return;
    reloadCalled = true;

    var browser = getBrowserType();
    if(locale){
	var qslocale = querySt("l");
	var ps;
	var suf;

	if (browser == "ie")
	{
            if(qslocale){
                // replace the value with the new value if changed, else reload
		if (qslocale == locale) {
			window.location.reload();
		} else {
        	        window.location.href = window.location.href.replace('='+qslocale,'='+locale);
		}
            } else {
		ps = window.location.href.split("#");
		suf = "";
		if (ps.length > 1) {
			suf = "#" + ps[1];
		}
                window.location.href = ps[0] + (ps[0].indexOf("?") == -1?"?":"&") + "l="+locale + suf;
		
	    }
        }
	else
	{
            if(qslocale){
                // replace the value with the new value if changed, else reload
		if (qslocale == locale) {
			location.reload();
		} else {
	                location.href = location.href.replace('='+qslocale,'='+locale);
		}
            } else {
		ps = location.href.split("#");
		suf = "";
		if (ps.length > 1) {
			suf = "#" + ps[1];
		}
                location.href = ps[0] + (ps[0].indexOf("?") == -1?"?":"&") + "l="+locale + suf;
	    }
        }

    }
    else
    {
	if (browser == "ie")
	{
	    window.location.reload();
	}
	else
	{
	    location.reload();
	}
    }
}

function continueToShowImpl(locale){
    objCookieUtils.setEscapedSessionCookie ("vshow-tys-status", "success");

    var browser = getBrowserType();
    if(locale){
	var qslocale = querySt("l");
	var ps;
	var suf;

	if (browser == "ie")
	{
            if(qslocale){
        	// replace the value with the new value if changed, else reload
		if (qslocale == locale) {
			window.location.reload();
		} else {
                	window.location.href = window.location.href.replace('='+qslocale,'='+locale);
		}
            } else {
		ps = window.location.href.split("#");
		suf = "";
		if (ps.length > 1) {
			suf = "#" + ps[1];
		}
                window.location.href = ps[0] + (ps[0].indexOf("?") == -1?"?":"&") + "l="+locale + suf;
		
	    }
        }
	else
	{
            if(qslocale){
                // replace the value with the new value if changed, else reload
		if (qslocale == locale) {
			location.reload();
		} else {
        	        location.href = location.href.replace('='+qslocale,'='+locale);
		}
            } else {
		ps = location.href.split("#");
		suf = "";
		if (ps.length > 1) {
			suf = "#" + ps[1];
		}
                location.href = ps[0] + (ps[0].indexOf("?") == -1?"?":"&") + "l="+locale + suf;
	    }
        }

    }
    else
    {
	if (browser == "ie")
	{
	    window.location.reload();
	}
	else
	{
	    location.reload();
	}
    }
}

// -->
