﻿// JScript File
	<!--
	
	function getQueryVariable(variable) 
	{
      var query = window.location.search.substring(1);
      var vars = query.split("&");
      for (var i=0;i<vars.length;i++) 
      {
        var pair = vars[i].split("=");
        if (pair[0] == variable) 
        {
          return pair[1];
        }
        else
        { 
            return '';
        }
      } 
    }


var siteString = getQueryVariable('site');
var DreyersURL;
var EdysURL;


switch(siteString.toLowerCase())
{
case 'americanidol':
    DreyersURL = 'http://dreyers.slowchurned.com/idol';
    EdysURL= 'http://edys.slowchurned.com/idol';
    break;
case 'idol':
    DreyersURL = 'http://dreyers.slowchurned.com/idol';
    EdysURL= 'http://edys.slowchurned.com/idol';
    break;
default: 
    DreyersURL = 'http://dreyers.slowchurned.com/default.aspx&m=1';
    EdysURL= 'http://edys.slowchurned.com/default.aspx&m=1';
}


	var MM_contentVersion = 6;
	var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
	if ( plugin ) {
			var words = navigator.plugins["Shockwave Flash"].description.split(" ");
		    for (var i = 0; i < words.length; ++i)
		    {
			if (isNaN(parseInt(words[i])))
			continue;
			var MM_PluginVersion = words[i]; 
		    }
		var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
	}
	else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
	   && (navigator.appVersion.indexOf("Win") != -1)) {
		document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
		document.write('on error resume next \n');
		document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
		document.write('</SCR' + 'IPT\> \n');
	}

	if ( MM_FlashCanPlay ) {
		document.write('<div align="center">');
		document.write('<OBJECT id=SlowChurned codeBase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 height=415 width=707 align=middle classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000>');
		document.write('<PARAM NAME="FlashVars" VALUE="DreyersUrl='+ DreyersURL + '&EdysUrl='+ EdysURL + '"/>');
		document.write('<PARAM NAME="Movie" VALUE="media/StateMap.swf"/>');
		document.write('<PARAM NAME="Src" VALUE="media/StateMap.swf"/>');
		document.write('<PARAM NAME="Base" VALUE="">');
		document.write('<PARAM NAME="AllowScriptAccess" VALUE="sameDomain"/>');
		document.write('<PARAM NAME="Scale" VALUE="ShowAll"/>');
		document.write('<PARAM NAME="Wmode" VALUE="Transparent"/>');
		document.write('<embed src="media/StateMap.swf" flashvars="DreyersUrl='+ DreyersURL + '&EdysUrl='+ EdysURL + '" quality="high" bgcolor="#660000" width="707" height="415" name="SlowChurned" align="middle" allowScriptAccess="sameDomain" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		document.write('</OBJECT>');
		document.write('</div>');
	} else{
		document.write('<div align="center">');
		document.write('<img SRC="images/StateMap.jpg" usemap="#StateMap" WIDTH="707" HEIGHT="415" border="0">');
		document.write('</div>');
	}

	//-->

