// Copyright 2010. INDG Digitale communicatie. All rights reserved. Parts are copyrighted by Adobe Macromedia Software, LLC.

var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;function getFlashActiveXVersion()
{var version;var axo;var e;try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");version=axo.GetVariable("$version");}catch(e){}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");version="WIN 6,0,21,0";axo.AllowScriptAccess="always";version=axo.GetVariable("$version");}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version=axo.GetVariable("$version");}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version="WIN 3,0,18,0";}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");version="WIN 2,0,0,11";}catch(e){version="0.0.0";}}
return version;}
function getFlashVersionString(){var flashVer="0.0.0";if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var swVer2=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var flashDescription=navigator.plugins["Shockwave Flash"+swVer2].description;var descArray=flashDescription.split(" ");var tempArrayMajor=descArray[2].split(".");var versionMajor=tempArrayMajor[0];var versionMinor=tempArrayMajor[1];if(descArray[3]!=""){tempArrayMinor=descArray[3].split("r");}else{tempArrayMinor=descArray[4].split("r");}
var versionRevision=tempArrayMinor[1]>0?tempArrayMinor[1]:0;var flashVer=versionMajor+"."+versionMinor+"."+versionRevision;}}
else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1)
flashVer="4.0.0";else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1)
flashVer="3.0.0";else if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1)
flashVer="2.0.0";else if(isIE&&isWin&&!isOpera){flashVer=getFlashActiveXVersion();}
if(flashVer){var theIndex=flashVer.lastIndexOf(" ");if(theIndex!=-1)
flashVer=flashVer.substr(theIndex+1);}
flashVer=flashVer.replace(/,/g,".");return flashVer;}
function DetectFlashVer(reqMajorVer,reqMinorVer,reqRevision)
{versionStr=getFlashVersionString();if(versionStr=="0.0.0"){return false;}else if(versionStr!=0){var versionArray=versionStr.split(".");var versionMajor=versionArray[0];var versionMinor=versionArray[1];var versionRevision=versionArray[2];if(versionMajor>parseFloat(reqMajorVer)){return true;}else if(versionMajor==parseFloat(reqMajorVer)){if(versionMinor>parseFloat(reqMinorVer))
return true;else if(versionMinor==parseFloat(reqMinorVer)){if(versionRevision>=parseFloat(reqRevision))
return true;}}
return false;}}
function AC_AddExtension(src,ext)
{if(src.indexOf('?')!=-1)
return src.replace(/\?/,ext+'?');else
return src+ext;}
function AC_GetHTML(objAttrs,params,embedAttrs)
{var str='';if(isIE&&isWin&&!isOpera)
{str+='<object ';for(var i in objAttrs)
str+=i+'="'+objAttrs[i]+'" ';str+=">";for(var i in params)
str+='<param name="'+i+'" value="'+params[i]+'" /> ';str+='</object>';}else{str+='<embed ';for(var i in embedAttrs)
str+=i+'="'+embedAttrs[i]+'" ';str+='> </embed>';}
return str;}
function AC_Generateobj(objAttrs,params,embedAttrs)
{var str=AC_GetHTML(objAttrs,params,embedAttrs);document.write(str);}
function AC_FL_RunContent(){var ret=AC_GetArgs
(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}
function AC_GetArgs(args,ext,srcParamName,classid,mimeType){var ret=new Object();ret.embedAttrs=new Object();ret.params=new Object();ret.objAttrs=new Object();for(var i=0;i<args.length;i=i+2){var currArg=args[i].toLowerCase();switch(currArg){case"classid":break;case"pluginspage":ret.embedAttrs[args[i]]=args[i+1];break;case"src":case"movie":args[i+1]=AC_AddExtension(args[i+1],ext);ret.embedAttrs["src"]=args[i+1];ret.params[srcParamName]=args[i+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblClick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":ret.objAttrs[args[i]]=args[i+1];break;case"id":case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"tabindex":case"style":ret.embedAttrs[args[i]]=ret.objAttrs[args[i]]=args[i+1];break;default:ret.embedAttrs[args[i]]=ret.params[args[i]]=args[i+1];}}
ret.objAttrs["classid"]=classid;if(mimeType)
ret.embedAttrs["type"]=mimeType;return ret;}
var INDG_CSSVALUE_SIMPLE="simple";var INDG_CSSVALUE_COMPLEX="complex";String.prototype.format=function()
{var theString=this;for(var i=0;i<arguments.length;i++){var theExpression=new RegExp("\\{"+(i)+"\\}");theString=theString.replace(theExpression,arguments[i]);}
return theString;}
String.prototype.formatV=function(aArguments)
{var theString=this;for(var i=1;i<aArguments.length;i++){var theExpression=new RegExp("\\{"+(i-1)+"\\}");theString=theString.replace(theExpression,aArguments[i]);}
return theString;}
if(Array.prototype.indexOf==undefined)
{Array.prototype.indexOf=function(aSearch){for(var i=0;i<this.length;i++){if(this[i]==aSearch)
return i;}
return-1;}}
function indgDelegate(aThisObject,aFunction)
{return function(aArgument)
{aFunction.call(aThisObject,aArgument);}}
if(window.com===undefined)
window.com=new Object();if(window.com.indg===undefined)
window.com.indg=new Object();com.indg.ResourceManager={initialize:function(aDefaultBundle,aDefaultLocale)
{this.defaultBundle=aDefaultBundle;this.defaultLocale=aDefaultLocale;},getString:function(aResourceName,aBundle,aLocale)
{var theBundle=(aBundle==null)?this.defaultBundle:aBundle;var theLocaleString=theBundle[aResourceName];if(theLocaleString==undefined)
return null;var theLocale=(aLocale==null)?this.defaultLocale:aLocale;var theString=theLocaleString[theLocale];if(theString!=undefined)
return theString;var theFirstLocaleName=null;for(var theName in theLocaleString){if(theFirstLocaleName==null)
theFirstLocaleName=theName;if(theName.indexOf(theLocale)==0)
return theLocaleString[theName];}
if(theFirstLocaleName!=null)
return theLocaleString[theFirstLocaleName];return null;},getLocaleStrings:function(aResourceName,aBundle)
{var theBundle=(aBundle==null)?this.defaultBundle:aBundle;var theLocaleString=theBundle[aResourceName];if(theLocaleString!=undefined)
return theLocaleString;return null;}}
com.indg.Log={_logger:null,setLogger:function(aFunction)
{com.indg.Log._logger=aFunction;},log:function(aType,aArray)
{try{var theString="";if(aArray.length>0){if(aArray[0]==null)
theString="NULL";else
theString=aArray[0].toString();}
var theArray=[];for(var theIndex=1;theIndex<arguments.length;theIndex++)
theArray.push(arguments[theIndex]);theString=theString.formatV(aArray);if(com.indg.Log._logger)
com.indg.Log._logger(aType,theString);}catch(e){alert("OOPS! "+e.message)}},debug:function(aMessage)
{com.indg.Log.log("DEBUG",arguments)},error:function(aMessage)
{com.indg.Log.log("ERROR",arguments)},warning:function(aMessage)
{com.indg.Log.log("WARNING",arguments)},info:function(aMessage)
{com.indg.Log.log("INFO",arguments)}}
com.indg.GoogleAnalytics=function(aGoogleObject,aCode)
{this.tracker=(aGoogleObject==null?null:aGoogleObject._getTracker(aCode));this.prefix=null;if(this.tracker!=null)
this.tracker._initData();com.indg.GoogleAnalytics.prototype.trackPageview=function(aPageView)
{if(this.tracker==null){com.indg.Log.debug("trackPageview: !!!No tracker available.");}else{com.indg.Log.debug("trackPageview: "+aPageView);var thePageView=(this.prefix==null)?aPageView:(this.prefix+aPageView);this.tracker._trackPageview(thePageView);}}
com.indg.GoogleAnalytics.prototype.trackEvent=function(aCategory,aAction,aLabel,aValue)
{if(this.tracker==null){com.indg.Log.debug("trackPageview: !!!No tracker available.");}else{com.indg.Log.debug("trackEvent: category={0}, action={1}, label={2}, value={3}",aCategory,aAction,aLabel,aValue);var theCategory=(aCategory==null)?"":aCategory;var theAction=(aAction==null)?"":aAction;var theLabel=(aLabel==null)?"":aLabel;if(!this.tracker._trackEvent(theCategory,theAction,theLabel,aValue))
com.indg.Log.error("Failed to track event");}}}
com.indg.BrowserHacks={hacks:[],enabled:true,run:function()
{if(!com.indg.BrowserHacks.enabled)
return;if(arguments.length<1)
throw new Error("Invalid function call on run()");var theName=arguments[0];var theFunctionArguments=Array.prototype.slice.call(arguments,1);var theFunction=com.indg.BrowserHacks.hacks[theName];if(theFunction!=null){com.indg.Log.debug("start browserhack: {0}",theName);try{var theResult=theFunction.call(null,theFunctionArguments);com.indg.Log.debug("browserhack run: {0} := {1}",theName,theResult);}catch(theError){com.indg.Log.error("browserhack error: {0}",theError.message);}
com.indg.Log.debug("end browserhack: {0}",theName);}else{com.indg.Log.warning("browserhack not found: {0}",theName);}},register:function(aName,aFunction)
{com.indg.BrowserHacks.hacks[aName]=aFunction;}}
function IndgStyleValue(aType,aValue)
{if(aType!=INDG_CSSVALUE_SIMPLE&&aType!=INDG_CSSVALUE_COMPLEX)
throw new Error();this.type=aType;this.value=aValue;}
AlertDetails={Cancel:-1,Ok:1};AlertButtons={Cancel:0x01,Ok:0x02};function Alert()
{this.buttonLabelOk=null;this.buttonLabelCancel=null;this.showCloseButton=true;this.buttonFlags=AlertButtons.Ok|AlertButtons.Cancel;this.style={titleClassName:"title",messageClassName:"text",buttonCloseClassName:"buttonClose",buttonCancelClassName:"buttonCancel",buttonOkClassName:"buttonOk"};var mCloseFunction=null;var mDomNode=null;Alert.prototype.show=function(aId,aTitle,aMessage,aCloseFunction)
{mCloseFunction=aCloseFunction;mDomNode=document.createElement("div");mDomNode.id=aId;if(aTitle!=null){var theTitleNode=document.createElement("div");theTitleNode.className=this.style.titleClassName;theTitleNode.innerHTML=aTitle;mDomNode.appendChild(theTitleNode);}
if(aMessage!=null){var theMessageNode=document.createElement("div");theMessageNode.className="text";theMessageNode.innerHTML=aMessage.replace(/\n/g,"<br/>");mDomNode.appendChild(theMessageNode);}
if(this.showCloseButton){var theCloseButton=document.createElement("button");theCloseButton.className=this.style.buttonCloseClassName;theCloseButton.onclick=indgDelegate(this,this.onCancelButtonClick);mDomNode.appendChild(theCloseButton);}
if((this.buttonFlags&AlertButtons.Cancel)==AlertButtons.Cancel){var theCancelButton=document.createElement("button");theCancelButton.className=this.style.buttonCancelClassName;var theLabel=(this.buttonLabelCancel==null)?com.indg.ResourceManager.getString("alert_Cancel"):this.buttonLabelCancel;theCancelButton.innerHTML="<table style=\"height:100%;width:100%;\"><tr><td>"+theLabel+"</td></tr></table>";theCancelButton.onclick=indgDelegate(this,this.onCancelButtonClick);mDomNode.appendChild(theCancelButton);}
if((this.buttonFlags&AlertButtons.Ok)==AlertButtons.Ok){var theOkButton=document.createElement("button");theOkButton.className=this.style.buttonOkClassName;var theLabel=(this.buttonLabelOk==null)?com.indg.ResourceManager.getString("alert_Ok"):this.buttonLabelOk;theOkButton.innerHTML="<table style=\"height:100%;width:100%;\"><tr><td>"+theLabel+"</td></tr></table>";theOkButton.onclick=indgDelegate(this,this.onOkButtonClick);mDomNode.appendChild(theOkButton);}
var theTop=((document.documentElement.clientHeight-400)/2)+"px";mDomNode.style.top=theTop;document.body.appendChild(mDomNode);return mDomNode;}
Alert.prototype.close=function(aDetail)
{mDomNode.parentNode.removeChild(mDomNode);mDomNode=null;if(mCloseFunction!=null)
mCloseFunction(aDetail);}
Alert.prototype.toString=function()
{return"Alert";}
Alert.prototype.onOkButtonClick=function()
{this.close(AlertDetails.Ok);}
Alert.prototype.onCancelButtonClick=function()
{this.close(AlertDetails.Cancel);}}function BrowserDetection()
{this.platform=null;this.platformVersion=null;this.browserId=null;this.browserVersion=null;this._userAgent=null;BrowserDetection.prototype.initialize=function(aOverrideUserAgent)
{if(aOverrideUserAgent!=undefined)
this._userAgent=aOverrideUserAgent;var thePlatformData=this.findPlatform();if(thePlatformData!=null){this.platform=thePlatformData.name;this.platformVersion=thePlatformData.version;}
var theBrowserData=this.findBrowser();if(theBrowserData!=null){this.browserId=theBrowserData.name;this.browserVersion=theBrowserData.version;}}
BrowserDetection.prototype.toString=function()
{var theString="";theString+=(this.platform==undefined)?"unknown":this.platform;theString+=(this.platformVersion==undefined)?"?.?.?":(theString.length>0?", ":"")+this.platformVersion;if(this.browserId!=undefined){theString+=" - "+(theString.length>0?this.browserId:"unknown browser");if(this.browserVersion!=undefined)
theString+=" ("+this.browserVersion+")";}
if(theString.lenth==0)
theString="unknown"
return theString;}
BrowserDetection.prototype.findBrowser=function()
{var theBrowserDataList={firefox:{lookFor:"Firefox",versionRegEx:/Firefox\/(\d+(\.\d+(\.\d+)?)?)/},explorer:{lookFor:"MSIE",versionRegEx:/MSIE (\d+(\.\d+(\.\d+)?)?)/},opera:{lookFor:"Opera",versionRegEx:/Opera\/(\d+(\.\d+(\.\d+)?)?)/},chrome:{lookFor:"Chrome",versionRegEx:/Chrome\/(\d+(\.\d+(\.\d+)?)?)/},safari:{lookFor:"Safari",versionRegEx:/Version\/(\d+(\.\d+(\.\d+)?)?)/}};var theBrowserId=this.searchData(theBrowserDataList);if(theBrowserId==null)
return null;return new NamedVersionData(theBrowserId,this.searchVersion(theBrowserDataList[theBrowserId]));}
BrowserDetection.prototype.findPlatform=function()
{var theWindowsRegEx=/Windows NT (\d+(\.\d+))/;var theUserAgent=(this._userAgent==null)?navigator.userAgent:this._userAgent;var theMatches=theUserAgent.match(theWindowsRegEx);if(theMatches!=null&&theMatches.length>0)
return new NamedVersionData("windows",com.indg.Util.parseVersionString(theMatches[1]));var theMacRegEx=/Intel Mac OS\s?X(\s*\d+(\.|_\d+))?/;theMatches=theUserAgent.match(theMacRegEx);if(theMatches!=null&&theMatches.length>0){var theVersion=null;if(theMatches.length>1&&theMatches[1]!=undefined)
theVersion=com.indg.Util.parseVersionString(theMatches[1].replace("_","."));return new NamedVersionData("mac",theVersion);}
return null;}
BrowserDetection.prototype.searchData=function(aDataList)
{var theUserAgent=(this._userAgent==null)?navigator.userAgent:this._userAgent;for(var theName in aDataList){var theData=aDataList[theName];if(theUserAgent.indexOf(theData.lookFor)!=-1)
return theName;}
return null;}
BrowserDetection.prototype.searchVersion=function(aBrowserData)
{if(aBrowserData==null||aBrowserData.versionRegEx==null)
throw new Error();var theUserAgent=(this._userAgent==null)?navigator.userAgent:this._userAgent;var theVersionRegEx=aBrowserData.versionRegEx;var theMatches=theUserAgent.match(aBrowserData.versionRegEx);if(theMatches==null)
return null;return com.indg.Util.parseVersionString(theMatches[1]);}}
function NamedVersionData(aName,aVersion)
{this.name=aName;this.version=aVersion;}
function DEX(aBaseURL)
{this.baseURL=aBaseURL;this.container=document.createElement("IMG");this.container.style.display="none";this.container.id="dex";document.body.appendChild(this.container);DEX.prototype.trackPageview=function(aPageView)
{if(aPageView==null)
return;var theParameters="t=p&p={0}&qq={1}";this._track(theParameters.format(encodeURI(aPageView),Math.random()));}
DEX.prototype.trackEvent=function(aCategory,aAction,aLabel,aValue)
{var theParameters="t=e&c={0}&a={1}&l={2}&v={3}&qq={4}";theParameters=theParameters.format(aCategory==null?"":encodeURI(aCategory),aAction==null?"":encodeURI(aAction),aLabel==null?"":encodeURI(aLabel),encodeURI(aValue==null?"":parseInt(aValue)),Math.random());this._track(theParameters);}
DEX.prototype._track=function(aParameters)
{var theSeparator=(this.baseURL.indexOf("?")==-1)?"?":"&";this.container.src=this.baseURL+theSeparator+aParameters;}}
if(window.com===undefined)
window.com=new Object();if(window.com.indg===undefined)
window.com.indg=new Object();com.indg.Util={_sessionID:null,getSessionID:function()
{if(com.indg.Util._sessionId==null)
com.indg.Util._sessionId=com.indg.Util.createUID();return com.indg.Util._sessionId;},createUID:function(aPrefix)
{var theResult="INDG-UID-"+parseInt(Math.random()*1000000)+(new Date().getTime());if(aPrefix)
theResult=aPrefix+theResult;return theResult;},decodeRectangle:function(aString)
{if(aString==null||aString=="")
return null;try{aString=aString.replace(/;$/g,"");aString="{"+aString.replace(/\s*;\s*/g,",")+"}";return eval("("+aString+")")}catch(theError){com.indg.Log.error("invalid rectangle: "+aString);}
return null;},rectangleIntersects:function(aFirstRectangle,aSecondRectangle)
{if(aFirstRectangle.x>aSecondRectangle.x+aSecondRectangle.width)return false;if(aFirstRectangle.x+aFirstRectangle.width<aSecondRectangle.x)return false;if(aFirstRectangle.y>aSecondRectangle.y+aSecondRectangle.height)return false;if(aFirstRectangle.y+aFirstRectangle.height<aSecondRectangle.y)return false;return true;},findBestZoomScale:function(aCallbackFunction,aDoWithCallLater)
{var theCallLater=function(){var theScale=1;if(window._controlManager!=null){var theControlList=window._controlManager.getControls();for(var theIndex=0;theIndex<theControlList.length;theIndex++){var theName=theControlList[theIndex];var theControl=_controlManager.get(theName);if(theControl.getAttribute("indg-type")!="FLASH"||!theControl.isVisible())
continue;try{var theNativeControl=_controlManager.getNativeObject(theName);if(theNativeControl!=null&&theNativeControl["getStageSize"]!=undefined){var theString=theNativeControl.getStageSize();if(theString!=null){var theArray=theString.split(",",2);if(theArray!=null&&theArray.length==2)
var theScale=parseInt(theArray[0])/theNativeControl.clientWidth;}}}catch(theError){com.indg.Log.error(theError.message);}}}
aCallbackFunction(theScale);}
if(aDoWithCallLater)
setTimeout(theCallLater,1);else
theCallLater();},getSystemLanguage:function()
{var theLanguage=null;try{if(navigator.language!=undefined){theLanguage=navigator.language;com.indg.Log.debug("getSystemLanguage - navigator.language - "+theLanguage);}else if(navigator.userLanguage!=undefined){theLanguage=navigator.userLanguage;com.indg.Log.debug("getSystemLanguage - navigator.userLanguage - "+theLanguage);}else if(navigator.browserLanguage!=undefined){theLanguage=navigator.browserLanguage;com.indg.Log.debug("getSystemLanguage - navigator.browserLanguage - "+theLanguage);}else if(navigator.systemLanguage!=undefined){theLanguage=navigator.systemLanguage;com.indg.Log.debug("getSystemLanguage - navigator.systemLanguage - "+theLanguage);}
if(theLanguage!=null&&theLanguage.match(/^[a-z]{2}(_|-)[A-Z]{2}$/gi)){theLanguage=theLanguage.charAt(0).toLowerCase()+theLanguage.charAt(1).toLowerCase()
+"_"
+theLanguage.charAt(3).toUpperCase()+theLanguage.charAt(4).toUpperCase();com.indg.Log.debug("getSystemLanguage - "+theLanguage);}else if(theLanguage!=null&&theLanguage.length!=2)
theLanguage=null;}catch(theError){com.indg.Log.error("invalid language: "+aString);}
return theLanguage;},sendMessage:function(aSource,aTarget,aMessage)
{var theReceivers=new Array();if(aTarget!=null){var theTarget=_controlManager.get(aTarget)
if(!theTarget)
return theReceivers;theTarget.sendMessage(aSource,aTarget,aMessage);theReceivers.push(aTarget);}else{var theList=_controlManager.getControls();for(var i=0;i<theList.length;i++){var theTarget=_controlManager.get(theList[i])
if(theTarget==null)
continue;theTarget.sendMessage(aSource,null,aMessage);theReceivers.push(theList[i]);}}
return theReceivers;},parseVersionString:function(aVersionString)
{var theVersion=new Version(0,0,0);if(aVersionString==null)
return theVersion;var theArray=aVersionString.split(".");if(theArray.length>0)
theVersion.major=parseInt(theArray[0]);if(theArray.length>1)
theVersion.minor=parseInt(theArray[1]);if(theArray.length>2)
theVersion.revision=parseInt(theArray[2]);return theVersion;},parseKeyValueListString:function(aString)
{var theExpression=/\s*([^=]*)\s*=\s*([^\s]*)\s*/g;var theMap=new Object();var theMatches=null;if(aString.match(theExpression)){while((theMatches=theExpression.exec(aString))!=null){theMatches.index=theMatches.lastIndex;var theKey=theMatches[1];var theValue=theMatches[2];theMap[theKey]=theValue;}}
return theMap;},parseVersionRangeString:function(aString)
{if(aString==null)
return null;if(aString.length==0)
return new Array();var theRe=/\s*,\s*/;var theArray=aString.split(theRe);var theResult=new Array();for(var theIndex=0;theIndex<theArray.length;theIndex++){var theString=theArray[theIndex];var theRegExpRange=/\s*-\s*/;var theRanges=theString.split(theRegExpRange);if(theRanges.length<=0||theRanges.length>2)
throw new Error();var theStartVersion=null;var theEndVersion=null;if(theRanges.length==1){var theMinInfinityRegEx=/^\-(\d*(\.\d*){0,2})$/;var theMinInfinityMatches=theRanges[0].match(theMinInfinityRegEx);var theMaxInfinityRegEx=/^(\d*(\.\d*){0,2})\+$/;var theMaxInfinityMatches=theRanges[0].match(theMaxInfinityRegEx);if(theMinInfinityMatches!=null&&theMaxInfinityMatches!=null)
throw new Error("Cannot declare min and max infinity at the same time.");if(theMinInfinityMatches!=null)
theEndVersion=com.indg.Util.parseVersionString(theMinInfinityMatches[1]);else if(theMaxInfinityMatches!=null)
theStartVersion=com.indg.Util.parseVersionString(theMaxInfinityMatches[1]);else
theStartVersion=theEndVersion=com.indg.Util.parseVersionString(theRanges[0]);}else{theStartVersion=com.indg.Util.parseVersionString(theRanges[0]);theEndVersion=com.indg.Util.parseVersionString(theRanges[1]);}
theResult.push(new VersionRange(theStartVersion,theEndVersion));}
return theResult;},getDOMElementStyle:function(aDOMElement,aStyleProperty)
{if(aDOMElement==null||aStyleProperty==null)
return null;if(aDOMElement.currentStyle!==undefined)
return new IndgStyleValue(INDG_CSSVALUE_SIMPLE,aDOMElement.currentStyle[aStyleProperty]);try{if(window.getComputedStyle!==undefined){var theCSSStyleDeclaration=window.getComputedStyle(aDOMElement,null);if(theCSSStyleDeclaration!=null)
return new IndgStyleValue(INDG_CSSVALUE_COMPLEX,theCSSStyleDeclaration.getPropertyCSSValue(aStyleProperty));}}catch(theError){com.indg.Log.error(theError.message);}
return null;},rgbToColorString:function(aRed,aGreen,aBlue)
{var theR=aRed.toString(16);if(theR.length==1)
theR="0"+theR;var theG=aGreen.toString(16);if(theG.length==1)
theG="0"+theG;var theB=aBlue.toString(16);if(theB.length==1)
theB="0"+theB;return"#"+theR+theG+theB;}}
if(window.com===undefined)
window.com=new Object();if(window.com.indg===undefined)
window.com.indg=new Object();if(window.com.indg.Control==null)
window.com.indg.Control=new Object();com.indg.Control.aggregateControl=function(aControl)
{aControl.hideMethod="resize";aControl.scale=1;if(!aControl.setScale){aControl.setScale=function(aScale){this.scale=aScale;if(this.getAttribute("indg-fullscreen")!="true"){var theX=this.getAttribute("indg-unscaled-x");var theY=this.getAttribute("indg-unscaled-y");if(!isNaN(theX)&&!isNaN(theY))
this.setNativePosition(theX,theY);var theWidth=this.getAttribute("indg-unscaled-width");var theHeight=this.getAttribute("indg-unscaled-height");if(!isNaN(theWidth)&&!isNaN(theHeight))
this.setNativeSize(theWidth,theHeight);}}}
if(!aControl.setNativeFullScreen){aControl.setNativeFullScreen=function(aFullScreen){if(aFullScreen){this.style.left="0px";this.style.top="0px";this.style.right="0px";this.style.bottom="0px";this.style.height="100%";this.style.width="100%";}else{this.style.left=null;this.style.top=null;this.style.right=null;this.style.bottom=null;}}}
if(!aControl.setNativeSize){aControl.setNativeSize=function(aWidth,aHeight){if(isNaN(aWidth))
throw new Error("Invalid width: "+aWidth);if(isNaN(aHeight))
throw new Error("Invalid height: "+aHeight);var theWidth=aWidth;if(!isNaN(this.minWidth)&&theWidth<this.minWidth)
theWidth=this.minWidth;if(theWidth>0)
this.setAttribute("indg-unscaled-width",theWidth);else
this.removeAttribute("indg-unscaled-width");this.style.width=(theWidth/this.scale+"px");var theHeight=aHeight;if(!isNaN(this.minHeight)&&theHeight<this.minHeight)
this.style.height=this.minHeight;if(theHeight>0)
this.setAttribute("indg-unscaled-height",theHeight);else
this.removeAttribute("indg-unscaled-height");this.style.height=(theHeight/this.scale+"px");}}
if(!aControl.setNativePosition){aControl.setNativePosition=function(aX,aY){if(isNaN(aX))
throw new Error("Invalid x: "+aX);if(isNaN(aY))
throw new Error("Invalid y: "+aY);this.setAttribute("indg-unscaled-x",aX);this.setAttribute("indg-unscaled-y",aY);this.style.left=(aX/this.scale+"px");this.style.top=(aY/this.scale+"px");}}
if(!aControl.setNativeVisible){aControl.setNativeVisible=function(aVisible){var theIsFullScreen=this.getAttribute("indg-fullscreen")=="true";var theMinWidth=isNaN(this.minWidth)?0:this.minWidth;var theMinHeight=isNaN(this.minHeight)?0:this.minHeight;if(aVisible){switch(this.hideMethod){case"resize":if(theIsFullScreen){this.setNativeFullScreen(true);}else{var theSize=this.getSize();this.setNativeSize(theSize.width,theSize.height);}
break;case"reposition":var thePosition=this.getPosition();this.setNativePosition(thePosition.x,thePosition.y);break;case"normal":this.style.display="none";break;default:throw new Error("Unknown hide method: "+this.hideMethod);}}else{switch(this.hideMethod){case"resize":this.setNativeSize(theMinWidth,theMinHeight);break;case"reposition":var theSize=this.getSize();this.setNativePosition(-theSize.width+theMinHeight,-theSize.height+theMinWidth);break;case"normal":this.style.display="block";break;default:throw new Error("Unknown hide method: "+this.hideMethod);}}}}
if(!aControl.show){aControl.show=function(aShow){this.setAttribute("indg-visible",aShow.toString());this.setNativeVisible(aShow);if(aShow)
com.indg.Util.findBestZoomScale(doControlScale,true);function doControlScale(aScale){aControl.setScale(aScale);}
return true;}}
if(!aControl.isVisible){aControl.isVisible=function(){var theString=this.getAttribute("indg-visible");if(theString==null||theString.length==0)
return true;return this.getAttribute("indg-visible")=="true";}}
if(!aControl.setSize){aControl.setSize=function(aWidth,aHeight){var theName=this.getAttribute("indg-name");com.indg.Log.debug("setSize '{0}' to {1}, {2}",theName,aWidth,aHeight);aWidth=parseInt(aWidth);aHeight=parseInt(aHeight);if(isNaN(aWidth))
com.indg.Log.error("invalid width {0} for {1}",aWidth,theName);if(isNaN(aHeight))
com.indg.Log.error("invalid height {0} for {1}",aHeight,theName);if(!isNaN(this.minWidth)&&aWidth<this.minWidth)
aWidth=this.minWidth;if(!isNaN(this.minHeight)&&aHeight<this.minHeight)
aHeight=this.minHeight;this.setAttribute("indg-real-dimension",aWidth+"px,"+aHeight+"px");if(this.hideMethod!="resize"||(this.isVisible()&&this.hideMethod=="resize"))
this.setNativeSize(aWidth,aHeight);return true;}}
if(!aControl.getSize){aControl.getSize=function(){var theSize=this.getAttribute("indg-real-dimension");var theDimension={width:this.clientWidth,height:this.clientHeight}
if(!this.getAttribute("indg-fullscreen")&&theSize!=null){theSize=theSize.split(",");var theWidth=parseInt(theSize[0]);var theHeight=parseInt(theSize[1]);theDimension.width=isNaN(theWidth)?this.clientWidth:theWidth;theDimension.height=isNaN(theHeight)?this.clientHeight:theHeight;}
return theDimension;}}
if(!aControl.getBounds){aControl.getBounds=function(){var thePosition=this.getPosition();var theSize=this.getSize();return{x:thePosition.x,y:thePosition.y,width:theSize.width,height:theSize.height};}}
if(!aControl.enable){aControl.enable=function(aEnable){this.disabled=!aEnable;return true;}}
if(!aControl.isEnabled){aControl.isEnabled=function(){return!this.disabled;}}
if(!aControl.setPosition){aControl.setPosition=function(aX,aY){var theName=this.getAttribute("indg-name");com.indg.Log.debug("setPosition '{0}' to {1}, {2}",theName,aX,aY);aX=parseInt(aX);aY=parseInt(aY);if(isNaN(aX)){com.indg.Log.error("invalid x cooordinate {0} for {1}",aX,theName);return;}
if(isNaN(aY)){com.indg.Log.error("invalid y cooordinate {0} for {1}",aY,theName);return;}
this.setAttribute("indg-real-position",aX+"px,"+aY+"px");if(this.hideMethod!="reposition"||(this.isVisible()&&this.hideMethod=="reposition"))
this.setNativePosition(aX,aY);return true;}}
if(!aControl.getPosition){aControl.getPosition=function(){var thePosition={x:parseInt(this.style.left),y:parseInt(this.style.top)}
var thePositionString=this.getAttribute("indg-real-position");if(thePositionString!=null){var theArray=thePositionString.split(",");thePosition.x=parseInt(theArray[0]);thePosition.y=parseInt(theArray[1]);}
return thePosition;}}
if(!aControl.setUrl){aControl.setUrl=function(aUrl){var theTranslatedURL=com.indg.Control.translateURL(aUrl);com.indg.Log.info("url - "+theTranslatedURL);this.src=theTranslatedURL;return true;}}
if(!aControl.getZindex){aControl.getZindex=function(){var theIndex=parseInt(this.style.zIndex);if(isNaN(theIndex))
return null;return theIndex;}}
if(!aControl.setZIndex){aControl.setZIndex=function(aIndex){var theIndex=parseInt(aIndex);if(isNaN(theIndex))
theIndex=0;this.style.zIndex=theIndex;}}
if(!aControl.setClippingRegion){aControl.setClippingRegion=function(aListOfClippingRegions,aDisable){com.indg.Log.debug("setClippingRegion {0} - {1}",aListOfClippingRegions,aDisable);var theName=this.getAttribute("indg-name");if(!this.isVisible()){com.indg.Log.debug("setClippingRegion not visible {0}",theName)
return;}
if(aListOfClippingRegions==null){this.removeAttribute("indg-clipped");var theSize=this.getSize();this.setNativeSize(theSize.width,theSize.height);com.indg.Log.debug("reset clippingRegion {0} ({1},{2}) >> ({3},{4}) ",theName,this.style.width,this.style.height,theSize.width,theSize.height);}else{this.setAttribute("indg-clipped",true.toString());var theIsClipped=false;var theBounds=this.getBounds();var theLeft=theBounds.x;var theTop=theBounds.y;var theRight=theBounds.x+theBounds.width;var theBottom=theBounds.y+theBounds.height;com.indg.Log.debug("bounds {0} - {1},{2},{3},{4}",theName,theLeft,theTop,theRight,theBottom);for(var theIndex=0;theIndex<aListOfClippingRegions.length;theIndex++){var theRegion=aListOfClippingRegions[theIndex];if(com.indg.Util.rectangleIntersects(theBounds,theRegion)){theIsClipped=true;break;}}
var theSize=this.getSize();if(theIsClipped&&aListOfClippingRegions.length==1){var theClippingRegion=aListOfClippingRegions[0];if(theTop<=theClippingRegion.y&&theBottom<=(theClippingRegion.y+theClippingRegion.height)){theHeight=theClippingRegion.y-theTop;this.setNativeVisible(true);this.setNativeSize(theSize.width,theHeight);com.indg.Log.debug("bottom side clipping {0} - {1} --> {2}",theName,theBottom-theTop,theHeight);}else{com.indg.Log.debug("list of clippings, complete clipping {0} - {1},{2},{3},{4}",theName,theLeft,theTop,theRight,theBottom);this.setNativeVisible(false);}}else if(theIsClipped){com.indg.Log.debug("complete clipping list {0}",theName);this.setNativeVisible(false);}else if(!theIsClipped){com.indg.Log.debug("clipping no region intersect: {0}",theName);this.setNativeVisible(true);}}}}
if(!aControl.setFullScreen){aControl.setFullScreen=function(aFullScreen){var theName=this.getAttribute("indg-name");com.indg.Log.debug("indg-fullscreen {0} - {1}",theName,aFullScreen?"Y":"N");if(aFullScreen){this.show(true);this.enable(true);this.setAttribute("indg-fullscreen","true");}else{this.removeAttribute("indg-fullscreen");}
this.setNativeFullScreen(aFullScreen);}}}
com.indg.Control.translateURL=function(aUrl)
{if(aUrl==null)
return null;if(aUrl.indexOf("indg://")!=0)
return aUrl;var theTranslatedURL=null;if(!window.location.href.match(/\/$/)){var theArray=window.location.href.split('/');var theFileName=theArray.pop();theTranslatedURL=theArray.join("/");}else
theTranslatedURL=window.location.href;theTranslatedURL+=aUrl.replace("indg:/","");return theTranslatedURL;}
if(window.com===undefined)
window.com=new Object();if(window.com.indg===undefined)
window.com.indg=new Object();com.indg.ControlManager=function(aParent)
{this.parent=aParent;this._hasUnityMouseEventListeners=false,com.indg.ControlManager.prototype._createShockwaveControl=function(aName,aUrl,aOptions)
{var theObjectID="native_"+aName;var theArguments=["src",aUrl,"width","100%","height","100%","bgcolor",this._getBackgroundColor(),"id",theObjectID,"name",theObjectID,"allowScriptAccess","always","type","application/x-director","pluginspage","http://www.macromedia.com/shockwave/download/","sw2",aName,"swRemote","swContextMenu='false'","swStretchStyle","stage","playerVersion","11","style","position:absolute;left:0px;top:0px;right:0px;bottom:0px;"];if(sSettings.messageServer=="host"){theArguments.push("sw3");theArguments.push(sSettings.movies[0].name);theArguments.push("sw4");theArguments.push("false");}
if(aOptions!=null)
theArguments=theArguments.concat(aOptions);var theObject=AC_GetArgs
(theArguments,"","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000","application/x-director");var theHTML=AC_GetHTML(theObject.objAttrs,theObject.params,theObject.embedAttrs);if(sSettings.messageServer=="host"){theHTML+="<script language=\"javascript\" for=\""+theObjectID+"\" event=\"ExternalEvent(aCommand)\">try{eval(\"gen3d_\" + aCommand);}catch(e){com.indg.Log.error(e.message);}</script>";}
com.indg.Log.debug("SHOCKWAVE HTML:= {0}",theHTML);var theControl=this.parent.ownerDocument.createElement("div");this.parent.appendChild(theControl);theControl.innerHTML=theHTML;theControl.sendMessage=function(aSource,aTarget,aMessage){this.childNodes[0].EvalScript(aMessage);}
return theControl;}
com.indg.ControlManager.prototype._createUnityControl=function(aName,aUrl,aOptions,aOwnerControlId)
{var theUrl=aUrl;var theObjectID="native_"+aName;var theArguments=["src",theUrl,"width","100%","height","100%","bgcolor",this._getBackgroundColor(),"id",theObjectID,"name",theObjectID,"type","application/vnd.unity","disableContextMenu","true","pluginspage","http://www.unity3d.com/unity-web-player-2.x","style","position:absolute;left:0px;top:0px;right:0px;bottom:0px;"];if(aOptions!=null){var theDictionary=com.indg.Util.parseKeyValueListString(aOptions);for(var theKey in theDictionary){theArguments.push(theKey);theArguments.push(theDictionary[theKey]);}}
var theObject=AC_GetArgs
(theArguments,"","src","clsid:444785F1-DE89-4295-863A-D46C3A781394","application/vnd.unity");var theHTML=AC_GetHTML(theObject.objAttrs,theObject.params,theObject.embedAttrs);com.indg.Log.info("UNITY HTML:= {0}",theHTML);var theControl=this.parent.ownerDocument.createElement("div");this.parent.appendChild(theControl);theControl.innerHTML=theHTML;theControl.sendMessage=function(aSource,aTarget,aMessage)
{this.childNodes[0].SendMessage("ExternalWrapper","OnMessageEvent",aMessage);}
return theControl;}
com.indg.ControlManager.prototype._createFlashControl=function(aName,aUrl,aOptions)
{var theURL=aUrl;if(aOptions!=null){theURL+=(theURL.indexOf("?")==-1)?"?":"&";theURL+=aOptions;}
var theObjectID="native_"+aName;var theArguments=["src",theURL,"width","100%","height","100%","bgcolor",this._getBackgroundColor(),"id",theObjectID,"name",theObjectID,"allowScriptAccess","always","seamlessTabbing","true","type","application/x-shockwave-flash","pluginspage","http://www.adobe.com/go/getflashplayer","quality","high","allowFullScreen","true"];com.indg.BrowserHacks.run("flash.wmode",theArguments);var theObject=AC_GetArgs
(theArguments,"","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");var theHTML=AC_GetHTML(theObject.objAttrs,theObject.params,theObject.embedAttrs);var theControl=this.parent.ownerDocument.createElement("div");this.parent.appendChild(theControl)
theControl.innerHTML=theHTML;com.indg.Log.debug("Control HTML: "+theHTML);theControl.sendMessage=function(aSource,aTarget,aMessage)
{this.childNodes[0].onMessageEvent(aSource,aTarget,aMessage);}
return theControl;}
com.indg.ControlManager.prototype.create=function(aType,aName,aVisible,aX,aY,aWidth,aHeight,aUrl,aOptions,aOwnerControlId)
{if(this.get(aName))
throw new Error("The control "+aName+" is already created.")
var theControl=null;var thePluginType=null;switch(aType.toLowerCase()){case"3d":var the3DType=null;var theUrl=aUrl;var theOptions=aOptions;if(sSettings.shockwave!=undefined){the3DType="shockwave";if(theUrl==null)
theUrl=sSettings.shockwave.url;if(theOptions==null)
theOptions=sSettings.shockwave.options;}else if(sSettings.unity!=undefined){the3DType="unity";if(theUrl==null)
theUrl=sSettings.unity.url;if(theOptions==null)
theOptions=sSettings.unity.options;}
thePluginType=the3DType;com.indg.Log.debug("3d type: {0}",the3DType);com.indg.Log.debug("3d url: {0}",theUrl);com.indg.Log.debug("3d options: {0}",theOptions);switch(the3DType){case"unity":var theURLArguments=null;if(theUrl.indexOf("#")==-1)
theURLArguments="#";else
theURLArguments="&";theURLArguments+="controlId="+decodeURI(aName)+"&ownerControlId="+decodeURI(aOwnerControlId);theControl=this._createUnityControl(aName,theUrl+theURLArguments,theOptions,aOwnerControlId);if(!this._hasUnityMouseEventListeners)
this._addUnityMouseEventListeners();break;case"shockwave":theControl=this._createShockwaveControl(aName,theUrl,theOptions);break;default:throw new Error("Unknown 3D type:"+the3DType);}
theControl.minWidth=1;theControl.minHeight=1;break;case"application":thePluginType="application";com.indg.Log.error("Creating an Application Control is unsupported in the online version");break;case"webbrowser":thePluginType="webbrowser";theControl=this.parent.ownerDocument.createElement("iframe");var theTranslatedURL=com.indg.Control.translateURL(aUrl);com.indg.Log.info("url - "+theTranslatedURL);theControl.src=theTranslatedURL;this.parent.appendChild(theControl);break;case"flash":thePluginType="flash";theControl=this._createFlashControl(aName,aUrl,aOptions)
theControl.minWidth=1;theControl.minHeight=1;break;}
if(theControl==null)
return false;com.indg.Control.aggregateControl(theControl);theControl.style.position="absolute";theControl.setAttribute("indg-name",aName);theControl.setAttribute("indg-type",aType.toUpperCase());theControl.setAttribute("indg-pluginType",thePluginType);if(sSettings.debug){theControl.style.backgroundColor="green";theControl.style.borderColor="cyan"}
var theZIndex=this.getLastZindex();theControl.setPosition(aX,aY);theControl.setSize(aWidth,aHeight);theControl.setZIndex(++theZIndex);theControl.show(aVisible);if(aVisible)
theControl.focus();com.indg.Log.debug("zIndex for {0} := {1}",aName,theControl.getZindex());return true;}
com.indg.ControlManager.prototype.getControls=function()
{var theResult=[];for(var i=0;i<this.parent.childNodes.length;i++){var theControl=this.parent.childNodes[i]
if(theControl.tagName==undefined)
continue;if(theControl.getAttribute("indg-name"))
theResult.push(theControl.getAttribute("indg-name"));}
return theResult;}
com.indg.ControlManager.prototype.getLastZindex=function()
{var theIndex=0;for(var i=0;i<this.parent.childNodes.length;i++){var theControl=this.parent.childNodes[i]
if(theControl.tagName==undefined)
continue;var theZ=theControl.style.zIndex;theIndex=isNaN(theZ)?0:((theZ=parseInt(theZ))>theIndex?theZ:theIndex);}
return theIndex;}
com.indg.ControlManager.prototype.get=function(aName)
{for(var i=0;i<this.parent.childNodes.length;i++){var theControl=this.parent.childNodes[i];if(theControl.tagName==undefined)
continue;if(theControl.getAttribute("indg-name")==aName)
return theControl;}
return false}
com.indg.ControlManager.prototype.getName=function(aControl)
{return aControl.getAttribute("indg-name");}
com.indg.ControlManager.prototype.release=function(aName)
{var theControl=this.get(aName);if(!theControl)
return false;this.parent.removeChild(theControl);delete theControl;}
com.indg.ControlManager.prototype.initialize=function()
{}
com.indg.ControlManager.prototype.getNativeObject=function(aName)
{var theName="native_"+aName;return this.parent.ownerDocument.getElementById(theName);}
com.indg.ControlManager.prototype._getBackgroundColor=function()
{var theColorString=null;var theNode=this.parent;while(theNode!=null){var theIndgStyleValue=com.indg.Util.getDOMElementStyle(theNode,"background-color");if(theIndgStyleValue!=null){if(theIndgStyleValue.type==INDG_CSSVALUE_SIMPLE&&theIndgStyleValue.value!="transparent"){theColorString=theIndgStyleValue.value;}else if(theIndgStyleValue.type==INDG_CSSVALUE_COMPLEX){var theCSSValue=theIndgStyleValue.value;switch(theCSSValue.cssValueType){case 1:if(theCSSValue.primitiveType==25){var theColorValue=theCSSValue.getRGBColorValue();var theAlpha=1;if(theColorValue.alpha!==undefined){theAlpha=theColorValue.alpha;}else{var theExpression=/rgba\s*\(.*(\d{1,3})\s*\)/;var theMatches=theCSSValue.cssText.match(theExpression);if(theMatches!=null&&theMatches.length==2)
theAlpha=parseInt(theMatches[1]);}
if(theAlpha!=0)
theColorString=com.indg.Util.rgbToColorString(theColorValue.red.getFloatValue(1),theColorValue.green.getFloatValue(1),theColorValue.blue.getFloatValue(1));}
break;}}}
if(theColorString!=null)
break;theNode=theNode.parentNode;}
return(theColorString==null)?"#ffffff":theColorString;}
com.indg.ControlManager.prototype._addUnityMouseEventListeners=function()
{if(this._hasUnityMouseEventListeners)
throw new Error();this._hasUnityMouseEventListeners=true;var theDocument=this.parent.ownerDocument;var thePreviousOnMouseUp=document.onmouseup;theDocument.onmouseup=function(aEvent)
{if(thePreviousOnMouseUp!=null)
thePreviousOnMouseUp(aEvent);var theControls=_controlManager.getControls();for(var theIndex=0;theIndex<theControls.length;theIndex++){var theName=theControls[theIndex];var theControl=_controlManager.get(theName);if(theControl.getAttribute("indg-pluginType")=="unity")
theControl.sendMessage(null,theName,"<mouseUp/>");}}
var thePreviousOnMouseDown=document.onmousedown;theDocument.onmousedown=function(aEvent)
{if(thePreviousOnMouseDown!=null)
thePreviousOnMouseDown(aEvent);var theControls=_controlManager.getControls();for(var theIndex=0;theIndex<theControls.length;theIndex++){var theName=theControls[theIndex];var theControl=_controlManager.get(theName);if(theControl.getAttribute("indg-pluginType")=="unity")
theControl.sendMessage(null,theName,"<mouseDown/>");}}}}
function Version(aMajor,aMinor,aRevision)
{this.major=aMajor;this.minor=aMinor;this.revision=aRevision;Version.prototype.toString=function()
{return this.major+"."+this.minor+"."+this.revision;}
Version.prototype.lessThen=function(aOtherVersion)
{if(aOtherVersion==null)
throw new Error();if(this.major<aOtherVersion.major)
return true;if(this.major==aOtherVersion.major&&(this.minor<aOtherVersion.minor))
return true;if(this.major==aOtherVersion.major&&(this.minor==aOtherVersion.minor)&&this.revision<aOtherVersion.revision)
return true;return false;}
Version.prototype.equals=function(aOtherVersion)
{if(aOtherVersion==null)
throw new Error();return(this.major==aOtherVersion.major&&this.minor==aOtherVersion.minor&&this.build==aOtherVersion.build);}
Version.prototype.toMajorMinor=function()
{return this.major+"."+this.minor;}}
function VersionRange(aStartVersion,aEndVersion)
{this.startVersion=aStartVersion;this.endVersion=aEndVersion;if(this.startVersion==null&&this.endVersion==null)
throw new Error();VersionRange.prototype.isInRange=function(aVersion)
{if(aVersion==null||(this.startVersion==null&&this.endVersion==null))
throw new Error();if(this.startVersion==null)
return(aVersion.lessThen(this.endVersion)||aVersion.equals(this.endVersion))
if(this.endVersion==null)
return(this.startVersion.lessThen(aVersion)||aVersion.equals(this.startVersion))
return(this.startVersion.lessThen(aVersion)||this.startVersion.equals(aVersion))&&(aVersion.lessThen(this.endVersion)||aVersion.equals(this.endVersion));}
VersionRange.prototype.toString=function()
{return this.startVersion+" - "+this.endVersion;}}
function ShockwaveVersionDetector()
{ShockwaveVersionDetector.prototype.getVersion=function()
{try{var theIsPluginDetection=(navigator.mimeTypes&&navigator.mimeTypes["application/x-director"]&&navigator.mimeTypes["application/x-director"].enabledPlugin);var theIsActiveXDetection=(undefined!=window.ActiveXObject);if(theIsPluginDetection)
return this.getPluginVersion();else if(theIsActiveXDetection)
return this.getActiveXVersion();}catch(theError){alert("Unabled to detect a proper Adobe Shockwave version");}
return null;}
ShockwaveVersionDetector.prototype.toString=function()
{var theVersion=this.getVersion();return(theVersion==null)?"Shockwave not installed":("Shockwave "+theVersion.toString());}
ShockwaveVersionDetector.prototype.getPluginVersion=function()
{var theArray=navigator.plugins;if(theArray!=null&&theArray.length>0){var thePlugin=theArray["Shockwave for Director"];var theName=thePlugin.name;var theDesc=thePlugin.description;var theExpression=/version (\d*).(\d*)/g;var theArray=null;if((theArray=theExpression.exec(theDesc))!=null){if(theArray.length>=3){return new Version(theArray[1],theArray[2],0);}}}
return null;}
ShockwaveVersionDetector.prototype.getActiveXVersion=function()
{try{var theControl=new ActiveXObject("SWCtl.SWCtl");if(theControl!=null){var theVersionString=theControl.ShockwaveVersion("");if(theVersionString!=null){var theArray=theVersionString.split(".");var theVersion=new Version(0,0,0);if(theArray.length>0)
theVersion.major=parseInt(theArray[0]);if(theArray.length>1)
theVersion.minor=parseInt(theArray[1]);if(theArray.length>2)
theVersion.revision=parseInt(theArray[2]);return theVersion;}}}catch(theError){}
return null;}}
function UnityVersionDetector()
{UnityVersionDetector.prototype.getVersion=function()
{try{var theIsPluginDetection=(navigator.mimeTypes&&navigator.mimeTypes["application/vnd.unity"]&&navigator.mimeTypes["application/vnd.unity"].enabledPlugin);var theIsActiveXDetection=(undefined!=window.ActiveXObject);if(theIsPluginDetection)
return this.getPluginVersion();else if(theIsActiveXDetection)
return this.getActiveXVersion();}catch(theError){alert("Unabled to detect a proper Unity version");}
return null;}
UnityVersionDetector.prototype.toString=function()
{var theVersion=this.getVersion();return(theVersion==null)?"Unity not installed":("Unity "+theVersion.toString());}
UnityVersionDetector.prototype.getPluginVersion=function()
{var theArray=navigator.plugins;if(theArray!=null&&theArray.length>0){var theId=com.indg.Util.createUID();var theNode=document.createElement("object");theNode.type="application/vnd.unity";theNode.id=theId;document.body.appendChild(theNode);var theVersion=null;try{theVersion=this.parseVersion(theNode.GetPluginVersion());}catch(theError){com.indg.Log.error(theError.message);}
theNode.parentNode.removeChild(theNode);return theVersion;}
return null;}
UnityVersionDetector.prototype.getActiveXVersion=function()
{try{var theControl=new ActiveXObject("UnityWebPlayer.UnityWebPlayer");if(theControl!=null){var theVersionString=theControl.GetPluginVersion();if(theVersionString!=null)
return this.parseVersion(theVersionString);}}catch(theError){}
return null;}
UnityVersionDetector.prototype.parseVersion=function(aString)
{var theArray=null;var theExpression=/(\d*)\.(\d*)\.(\d*)/g;if((theArray=theExpression.exec(aString))!=null){var theMajor=0;var theMinor=0;var theBuild=0;if(theArray.length>1)
theMajor=theArray[1];if(theArray.length>2)
theMinor=theArray[2];if(theArray.length>3)
theBuild=theArray[3];return new Version(theMajor,theMinor,theBuild);}
return null;}}
INDG_WRAPPER_VERSION="3.28";if(window.com===undefined)
window.com=new Object();if(window.com.indg===undefined)
window.com.indg=new Object();com.indg.Wrapper={version:INDG_WRAPPER_VERSION,initialized:false,shockwaveVersion:undefined,unityVersion:undefined,initialize:function(aParent)
{if(!sSettings.debug)
aParent.innerHTML="";window._controlManager=new com.indg.ControlManager(aParent);this._addDefaultEventListeners();com.indg.Wrapper.initialized=true;},load:function(aSettings)
{if(_controlManager==null)
throw new Error("Null ControlManager");if(aSettings.title!=undefined)
document.title=aSettings.title;if(aSettings.movies==undefined)
throw new Error("U have not specified any movies");for(var i=0;i<aSettings.movies.length;i++){var theMovie=aSettings.movies[i];var theOptions=aSettings.startMovieOptions;_controlManager.create("flash",theMovie.name,false,0,0,0,0,theMovie.url,theOptions);}
if(!aSettings.startMovie)
throw new Error("No start movie has been specified")
setControlVisible(aSettings.startMovie,true)
setControlFullWindow(aSettings.startMovie,true)
var theStartMovie=window._controlManager.getNativeObject(sSettings.startMovie);if(theStartMovie)
theStartMovie.focus();},_addDefaultEventListeners:function()
{var thePreviousWindowOnResize=window.onresize;window.onresize=function(aEvent){if(thePreviousWindowOnResize!=null)
thePreviousWindowOnResize(aEvent);com.indg.Wrapper.onResize(aEvent==null?event:aEvent);}
var thePreviousOnBeforeLoad=window.onbeforeunload;window.onbeforeunload=function(aEvent)
{if(thePreviousOnBeforeLoad!=null)
thePreviousOnBeforeLoad(aEvent);com.indg.Wrapper.onUnload(aEvent==null?event:aEvent);}}}
com.indg.Wrapper.onUnload=function(aEvent)
{com.indg.Log.debug("onUnload");var theControlIDs=window._controlManager.getControls();for(var theIndex=0;theIndex<theControlIDs.length;theIndex++){var theId=theControlIDs[theIndex];var theObject=window._controlManager.getNativeObject(theId);if(theObject!=null&&theObject["onUnload"])
theObject["onUnload"]();}}
com.indg.Wrapper.onResize=function(aEvent)
{com.indg.Log.debug("onResize");var theControlIds=window._controlManager.getControls();var theFunction=function doControlScale(aScale){theControl.setScale(aScale);}
for(var theIndex=0;theIndex<theControlIds.length;theIndex++){var theControlId=theControlIds[theIndex];var theControl=window._controlManager.get(theControlId);com.indg.Util.findBestZoomScale(theFunction,true);}}
function getMessagingProtocol()
{com.indg.Log.debug("getMessagingProtocol - "+sSettings.messageServer);return sSettings.messageServer;}
function hasCapability(aFunctionName)
{com.indg.Log.debug("hasCapability - {0}",aFunctionName);if(!window[aFunctionName])
return false;return typeof(eval(aFunctionName))=="function";}
function getCapabilities()
{com.indg.Log.debug("getCapabilities");var theResult=[];for(var i in window){if(typeof(eval(aFunctionName))!="function")
continue;theResult.push(i);}
com.indg.Log.debug("[{0}]",theResult.toString());return theResult.toString();}
function setControlEnable(aName,aEnable)
{com.indg.Log.debug("setControlEnable - '{0}' ({1})",aName,aEnable);var theControl=_controlManager.get(aName);if(!theControl)
return com.indg.Log.error("Control '{0}' not found",aName);theControl.enable(aEnable);return true;}
function isControlEnabled(aName)
{com.indg.Log.debug("isControlEnable - '{0}'",aName);var theControl=_controlManager.get(aName);if(!theControl)
return com.indg.Log.error("Control '{0}' not found",aName);return theControl.isEnabled();}
function setControlURL(aName,aUrl)
{com.indg.Log.debug("setControlUrl - '{0}'",aName);var theControl=_controlManager.get(aName);if(!theControl)
return com.indg.Log.error("Control '{0}' not found",aName);return theControl.setUrl(aUrl);}
function setControlVisible(aName,aVisible)
{com.indg.Log.debug("setControlVisible - '{0}' ({1})",aName,aVisible);try{var theControl=_controlManager.get(aName);if(!theControl)
return com.indg.Log.error("Control '{0}' not found",aName);theControl.show(aVisible);return true;}catch(e){com.indg.Log.error("setControlVisible - {0}",e.message);}
return false;}
function isControlVisible(aName)
{com.indg.Log.debug("isControlVisible - '{0}'",aName);var theControl=_controlManager.get(aName);if(!theControl)
return com.indg.Log.error("Control '{0}' not found",aName);return theControl.isVisible();}
function bringControlToTop(aName)
{com.indg.Log.debug("bringControlToTop - '{0}'",aName);var theControl=_controlManager.get(aName);if(!theControl)
return com.indg.Log.error("Control '{0}' not found",aName);var theIndex=_controlManager.getLastZindex();theIndex++;com.indg.Log.debug("bringControlToTop - '{0}' - {1}",aName,theIndex);theControl.setZindex(theIndex);return true;}
function getControls()
{com.indg.Log.debug("getControls");var theResult=_controlManager.getControls();com.indg.Log.debug("[{0}]",theResult.toString());return theResult.toString();}
function getControlID()
{com.indg.Log.debug("getControlID");return sSettings.startMovie;}
function getControlBounds(aName)
{com.indg.Log.debug("getControlBounds - '{0}'",aName);var theControl=_controlManager.get(aName);if(!theControl)
return com.indg.Log.error("Control '{0}' not found",aName);var theBounds=theControl.getBounds();var theResult="{0}, {1}, {2}, {3}"
var theString=theResult.format(theBounds.x,theBounds.y,theBounds.width,theBounds.height)
com.indg.Log.debug("controlBounds {0} ({1})",aName,theString);return theString;}
function setControlFullWindow(aName,aFullScreen)
{com.indg.Log.debug("setControlFullWindow - '{0}' {1}",aName,aFullScreen?"Y":"N");try{var theControl=_controlManager.get(aName);if(!theControl)
return com.indg.Log.error("Control '{0}' not found",aName);theControl.setFullScreen(aFullScreen);}catch(e){com.indg.Log.error("setControlFullWindow:= "+e.message);}
return true;}
function setControlBounds(aName,aX,aY,aWidth,aHeight)
{com.indg.Log.debug("setControlBounds - '{0}' ({1}, {2}, {3}, {4})",aName,aX,aY,aWidth,aHeight);try{var theControl=_controlManager.get(aName);if(!theControl)
return com.indg.Log.error("Control '{0}' not found",aName);theControl.setPosition(aX,aY);theControl.setSize(aWidth,aHeight);return true;}catch(e){com.indg.Log.error(e.message);}
return false;}
function deleteControl(aName)
{com.indg.Log.debug("deleteControl - '{0}'",aName);var theManager=_controlManager
var theControl=theManager.get(aName);if(!theControl)
return com.indg.Log.error("Control '{0}' not found",aName);theManager.release(aName);return true;}
function setCaption(aTitle)
{com.indg.Log.debug("setCaption - '{0}'",aTitle);_controlManager.parent.ownerDocument.title=aTitle;return true;}
function gen3d_sendMessage(aSource,aTarget,aMessage)
{try{com.indg.Log.debug("gen3d_sendMessage - '{0} --> {1}' ({2})",aSource,aTarget,aMessage);return com.indg.Util.sendMessage(aSource,aTarget,aMessage);}catch(e){com.indg.Log.error(e.message);}
return null;}
function sendMessage(aTarget,aMessage,aSource)
{try{if(aSource==null)
com.indg.Log.warning("NO SOURCE CONTROL ID GIVEN");return com.indg.Util.sendMessage(aSource,aTarget,aMessage);}catch(e){com.indg.Log.error(e.message);}
return null;}
function createControl(aType,aName,aVisible,aX,aY,aWidth,aHeight,aUrl,aOptions,aOwnerControlId)
{try{com.indg.Log.debug("create control {0} - (name:{1}, visible:{2}, x:{3}, y:{4}, width:{5}, height:{6}, url:{7}, options:{8})",aType,aName,aVisible,aX,aY,aWidth,aHeight,aUrl,aOptions);return _controlManager.create(aType,aName,aVisible,aX,aY,aWidth,aHeight,aUrl,aOptions,aOwnerControlId==undefined?null:aOwnerControlId);}catch(e){com.indg.Log.error(e.message)}
return false;}
function getSaveSettings()
{com.indg.Log.debug("getSaveSettings");try
{var theId=com.indg.Util.createUID("file_save_").replace(/[^a-zA-Z0-9]/g,"");var theSettings={id:theId,url:sSettings.filesystem.saveURL.format(theId),defaultFileName:sSettings.filesystem.dialog.defaultName}
return theSettings;}catch(theError){com.indg.Log.error("getSaveSettings... "+theError.message);}
return null;}
function getLoadSettings()
{com.indg.Log.debug("getLoadSettings");try
{var theId=com.indg.Util.createUID("file_load_").replace(/[^a-zA-Z0-9]/g,"");var theLoadSettings={id:theId,postUrl:sSettings.filesystem.loadPostURL.format(theId),getUrl:sSettings.filesystem.loadGetURL.format(theId),filter:sSettings.filesystem.dialog.filter}
return theLoadSettings;}catch(theError){com.indg.Log.error("getLoadSettings... "+theError.message);}
return null;}
function setControlClipBounds(aControlId,aListOfRectangles,aDisableControls)
{com.indg.Log.debug("setControlClipBounds - {0}, [{1}], {2}",aControlId,aListOfRectangles,aDisableControls);try{var theControl=_controlManager.get(aControlId);if(!theControl){com.indg.Log.error("Control '{0}' not found",aControlId);return false;}
if(aListOfRectangles==null){theControl.setClippingRegion(null,aDisableControls);}else{var theRectangleStringList=aListOfRectangles.split(/,\s?/);var theRectangleList=new Array();for(var i=0;i<theRectangleStringList.length;i++){var theRectangle=com.indg.Util.decodeRectangle(theRectangleStringList[i])
if(theRectangle!=null)
theRectangleList.push(theRectangle);}
theControl.setClippingRegion(theRectangleList,aDisableControls);}}catch(e){com.indg.Log.error("setControlClipBounds:= "+e.message);return false;}
return true;}
function log(aLevel,aDomain,aMessage)
{com.indg.Log.debug("log - "+aLevel+" - "+aDomain+" : "+aMessage);}
function webwrapper()
{com.indg.Log.debug("webwrapper - true");return true;}
function isInitialized()
{com.indg.Log.debug("isInitialized - {0}",com.indg.Wrapper.initialized?"YES":"NO");return com.indg.Wrapper.initialized;}
function hasPlugin(aPluginName)
{com.indg.Log.debug("hasPlugin - {0}",aPluginName);switch(aPluginName){case"shockwave":return supportControlType("3d");break;}
return false;}
function supportControlType(aType)
{switch(aType.toLowerCase()){case"3d":if(sSettings.shockwave!=null&&sSettings.shockwave.url!=null&&sSettings.shockwave.url.length>0){if(com.indg.Wrapper.shockwaveVersion===undefined)
com.indg.Wrapper.shockwaveVersion=indgGet3DVersion(true);return com.indg.Wrapper.shockwaveVersion!=null;}else if(sSettings.unity!=null&&sSettings.unity.url!=null&&sSettings.unity.url.length>0){if(com.indg.Wrapper.unityVersion===undefined)
com.indg.Wrapper.unityVersion=indgGet3DVersion(false);return com.indg.Wrapper.unityVersion!=null;}
return false;case"webbrowser":return true;case"application":return false;case"flash":return true;}}
function getApplicationVersion()
{return(sSettings.applicationVersion==undefined)?null:sSettings.applicationVersion;}
function getConfigurationVersion()
{return(sSettings.configurationVersion==undefined)?null:sSettings.configurationVersion;}
function getWrapperVersion()
{return com.indg.Wrapper.version;}
function getSystemLanguage()
{com.indg.Log.debug("getSystemLanguage");return com.indg.Util.getSystemLanguage();}
function trackPageView(aPageView)
{try{if(window.googleAnalytics!=null)
window.googleAnalytics.trackPageview(aPageView);if(window.dex!=null)
window.dex.trackPageview(aPageView);}catch(theError){com.indg.Log.error(theError.message);}}
function trackEvent(aCategory,aAction,aLabel,aValue)
{try{if(window.googleAnalytics!=null)
window.googleAnalytics.trackEvent(aCategory,aAction,aLabel,aValue);if(window.dex!=null)
window.dex.trackEvent(aCategory,aAction,aLabel,aValue);}catch(theError){com.indg.Log.error(theError.message);}}
function getBrowserId()
{return com.indg.BrowserDetection.browserId;}
function getBrowserVersion()
{var theVersion=com.indg.BrowserDetection.browserVersion;return(theVersion==null)?Number.NaN:theVersion.toMajorMinor();}
function getBrowserControlHideTime()
{var theBrowserDetection=com.indg.BrowserDetection;if(theBrowserDetection!=null&&theBrowserDetection.browserId=="firefox")
return 50;return 0;}
function getControl3DType()
{if(sSettings.shockwave!=null)
return"shockwave";if(sSettings.unity!=null)
return"unity";return null;}indgBrowserAndPlatformData=[{platform:"mac",browser:"firefox",platformVersion:"0.0 - 10.3.999",browserVersion:""},{platform:"mac",browser:"firefox",platformVersion:"10.4 - 10.5",browserVersion:"2.0, 3.6+"},{platform:"mac",browser:"firefox",platformVersion:"10.6+",browserVersion:"3.6+"},{platform:"mac",browser:"safari",platformVersion:"0.0 - 10.3.999",browserVersion:""},{platform:"mac",browser:"safari",platformVersion:"10.4+",browserVersion:"3.1+"},{platform:"mac",browser:"opera",platformVersion:"0+",browserVersion:""},{platform:"mac",browser:"chrome",platformVersion:"0+",browserVersion:""},{platform:"windows",browser:"explorer",platformVersion:"0 - 5.0.999",browserVersion:""},{platform:"windows",browser:"explorer",platformVersion:"5.1 - 5.999",browserVersion:"6+"},{platform:"windows",browser:"explorer",platformVersion:"6.0+",browserVersion:"7+"},{platform:"windows",browser:"firefox",platformVersion:"0 - 5.0.999",browserVersion:""},{platform:"windows",browser:"firefox",platformVersion:"5.1+",browserVersion:"2.0+"},{platform:"windows",browser:"safari",platformVersion:"0 - 5.0.999",browserVersion:""},{platform:"windows",browser:"safari",platformVersion:"5.1+",browserVersion:"3.1+"},{platform:"windows",browser:"opera",platformVersion:"0+",browserVersion:""},{platform:"windows",browser:"chrome",platformVersion:"0+",browserVersion:""}];com.indg.BrowserHacks.hacks["flash.wmode"]=function(aArguments)
{var theControlArguments=aArguments[0];if(theControlArguments==null)
throw new Error("Missing control arguments: ");var theBrowserDetection=com.indg.BrowserDetection;if(theBrowserDetection.browserId=="explorer")
return false;if(theBrowserDetection.browserId=="firefox"&&theBrowserDetection.browserVersion!=null&&!theBrowserDetection.browserVersion.lessThen(new Version(3,6,0)))
return false;if(theBrowserDetection.browserId=="safari"&&theBrowserDetection.platform=="mac"&&theBrowserDetection.browserVersion!=null&&!theBrowserDetection.browserVersion.lessThen(new Version(4,0,3)))
return false;theControlArguments.push("wmode");theControlArguments.push("opaque");return true;}
var FLASHPLAYER_MISSING="flashPlayer_Missing";var FLASHPLAYER_UNSUPPORTED="flashPlayer_NotSupported";var FLASHPLAYER_OLDVERSION="flashPlayer_OldVersion";var SHOCKWAVE_MISSING="shockwavePlayer_Missing";var SHOCKWAVE_OLDVERSION="shockwavePlayer_OldVersion";var SHOCKWAVE_64BIT_WARNING="shockwavePlayer_64BitWarning";var UNITY_MISSING="unityPlayer_Missing";var UNITY_OLDVERSION="unityPlayer_OldVersion";var BROWSER_UNSUPPORTED="browser_Unsupported";function indgDisplayAlert(aId,aTitle,aMessage,aButtonFlags,aCallbackWhenDone)
{if(sSettings.alertCallback===undefined){var theAlert=new Alert();theAlert.buttonFlags=aButtonFlags;theAlert.showCloseButton=(aButtonFlags&AlertButtons.Cancel)==AlertButtons.Cancel;theAlert.show("myDialogMissingPlugin",aTitle,aMessage,aCallbackWhenDone);}else{sSettings.alertCallback(aId,aTitle,aMessage,aButtonFlags,aCallbackWhenDone);}}
function indgDisplayFlashMissingDialog(aCallbackWhenDone)
{var theId=FLASHPLAYER_MISSING;var theTitle=com.indg.ResourceManager.getString("flashPlayer_Name");var theMessage=com.indg.ResourceManager.getString(theId);var theButtonFlags=AlertButtons.Ok;indgDisplayAlert(theId,theTitle,theMessage,theButtonFlags,aCallbackWhenDone);}
function indgDisplayFlashUnsupportedDialog(aCallbackWhenDone)
{var theId=FLASHPLAYER_UNSUPPORTED;var theTitle=com.indg.ResourceManager.getString("flashPlayer_Name");var theMessage=com.indg.ResourceManager.getString(theId);var theButtonFlags=AlertButtons.Ok;indgDisplayAlert(theId,theTitle,theMessage,theButtonFlags,aCallbackWhenDone);}
function indgDisplayFlashSupportedOldDialog(aCallbackWhenDone)
{var theId=FLASHPLAYER_OLDVERSION;var theTitle=com.indg.ResourceManager.getString("flashPlayer_Name");var theMessage=com.indg.ResourceManager.getString(theId);var theButtonFlags=AlertButtons.Ok|AlertButtons.Cancel;indgDisplayAlert(theId,theTitle,theMessage,theButtonFlags,aCallbackWhenDone);}
function indgDisplay3DMissingDialog(aIsShockwave,aIsRequired,aCallbackWhenDone)
{var theId=aIsShockwave?SHOCKWAVE_MISSING:UNITY_MISSING;var theTitle=com.indg.ResourceManager.getString(aIsShockwave?"shockwavePlayer_Name":"unityPlayer_Name");var theMessage=com.indg.ResourceManager.getString(theId);var theButtonFlags=aIsRequired?AlertButtons.Ok:AlertButtons.Ok|AlertButtons.Cancel;indgDisplayAlert(theId,theTitle,theMessage,theButtonFlags,aCallbackWhenDone);}
function indgDisplay3D64BitWarningDialog(aCallbackWhenDone)
{var theId=SHOCKWAVE_64BIT_WARNING;var theTitle=com.indg.ResourceManager.getString("shockwavePlayer_Name");var theMessage=com.indg.ResourceManager.getString(theId);var theButtonFlags=AlertButtons.Cancel;indgDisplayAlert(theId,theTitle,theMessage,theButtonFlags,aCallbackWhenDone);}
function indgDisplay3DSupportedOldDialog(aIsShockwave,aCallbackWhenDone)
{var theId=aIsShockwave?SHOCKWAVE_OLDVERSION:UNITY_OLDVERSION;var theTitle=com.indg.ResourceManager.getString(aIsShockwave?"shockwavePlayer_Name":"unityPlayer_Name");var theMessage=com.indg.ResourceManager.getString(theId);var theButtonFlags=AlertButtons.Ok|AlertButtons.Cancel;indgDisplayAlert(theId,theTitle,theMessage,theButtonFlags,aCallbackWhenDone);}
function indgDisplayUnsupportedBrowserDialog(aSupportedBrowserVersionRanges,aCallbackWhenDone)
{var theId=BROWSER_UNSUPPORTED;var theTitle=com.indg.ResourceManager.getString("browser_UnsupportedTitle");var theMessage=com.indg.ResourceManager.getString(theId);var theButtonFlags=AlertButtons.Cancel;if(aSupportedBrowserVersionRanges!=null&&aSupportedBrowserVersionRanges.length>0){var theHighestVersionRange=null;for(var theIndex=0;theIndex<aSupportedBrowserVersionRanges.length;theIndex++){var theVersionRange=aSupportedBrowserVersionRanges[theIndex];if((theHighestVersionRange==null)||(theHighestVersionRange.endVersion==null&&theVersionRange.startVersion.lessThen(theHighestVersionRange.startVersion))||(theVersionRange.endVersion==null&&theHighestVersionRange.startVersion.lessThen(theVersionRange.startVersion)))
theHighestVersionRange=theVersionRange;}
if(theHighestVersionRange==null)
throw new Error();var theSupportedVersionText=null;if(theHighestVersionRange.endVersion==null)
theSupportedVersionText=com.indg.ResourceManager.getString("browser_ShowSupportedVersions").format(theHighestVersionRange.startVersion.toMajorMinor());else
theSupportedVersionText=com.indg.ResourceManager.getString("browser_ShowSupportedVersion").format(theHighestVersionRange.endVersion.toMajorMinor());theMessage+="\n\n<p>";theMessage+=theSupportedVersionText;theMessage+="</p>";}
indgDisplayAlert(theId,theTitle,theMessage,theButtonFlags,aCallbackWhenDone);}
indgDefaultResourceBundle={flashPlayer_Name:{nl_NL:"Adobe Flash Player",en_US:"Adobe Flash Player"},flashPlayer_Missing:{nl_NL:"De Adobe Flash Player is niet ge&#239;nstalleerd. Deze plugin is nodig om verder te kunnen gaan.\n\nU kunt de nieuwste versie downloaden van de website van Adobe.\n\n<b>Let op, voor het installeren van de Adobe Flash Player zijn beheerders rechten nodig.</b>",en_US:"The Adobe Flash Player is not installed. This plugin is required to continue.\n\nYou can download the latest version from the Adobe website.\n\n<b>Attention, installation of the Adobe Flash Player requires administrator rights.</b>"},flashPlayer_NotSupported:{nl_NL:"Uw Adobe Flash Player is te oud.\n\nGa naar de website van Adobe om de nieuwste versie te downloaden.\n\n<b>Let op, voor het bijwerken van de Adobe Flash Player zijn beheerders rechten nodig.</b>",en_US:"Your Adobe Flash Player is too old.\n\nGo to the Adobe website to download the latest version.\n\n<b>Attention, updating the Adobe Flash Player requires administrator rights.</b>"},flashPlayer_OldVersion:{nl_NL:"Uw Adobe Flash Player is te oud enkele functies zijn niet beschikbaar of zullen minder goed werken.\n\nWilt u naar de website van Adobe gaan om de nieuwste versie te downloaden?\n\n<b>Let op, voor het bijwerken van de Adobe Flash Player zijn beheerders rechten nodig.</b>",en_US:"Your Adobe Flash Player is too old, some functions may not work properly.\n\nWould you like to go to the Adobe website to download the latest version?\n\n<b>Attention, updating the Adobe Flash Player requires administrator rights.</b>"},shockwavePlayer_Missing:{nl_NL:"U heeft geen Shockwave ge&#239;nstalleerd, deze plugin is nodig om in 3D te kunnen werken.\n\nWilt u naar de website van Adobe gaan om de plugin te downloaden?\n\n<b>Let op, voor het installeren van Shockwave zijn beheerdersrechten nodig.</b>",en_US:"You do not have Shockwave installed, this plugin is required to work with 3D.\n\nWould you like to go to the Adobe website to download the latest version?\n\n<b>Attention, installation of Shockwave requires administrator rights.</b>"},shockwavePlayer_OldVersion:{nl_NL:"Uw Shockwave player is te oud enkele functies zijn niet beschikbaar of zullen minder goed werken.\n\nWilt u naar de website van Adobe gaan om de plugin te downloaden?\n\n<b>Let op, voor het bijwerken van de Shockwave zijn beheerders rechten nodig.</b>",en_US:"Your Shockwave player is too old, some functions are not available or may not work properly.\n\nWould you like to go to the Adobe website to download the latest version?\n\n<b>Attention, updating Shockwave requires administrator rights.</b>"},shockwavePlayer_Name:{nl_NL:"Adobe Shockwave Player",en_US:"Adobe Shockwave Player"},shockwavePlayer_64BitWarning:{nl_NL:"Momenteel wordt 3D niet ondersteund op Snow Leopard (Apple OSX 10.6) in combinatie met een 64-bits browser zoals Safari.\n\nWilt u toch gebruik maken van de 3D functionaliteit dan dient u uw webbrowser in 32-bit mode te draaien.\n\nKijk op de <a href=\"http://kb2.adobe.com/cps/512/cpsid_51273.html\" target=\"messagewindow\">Adobe website</a> voor instructies hoe uw webbrowser in 32-bit mode te draaien.",en_US:"At this moment 3D is not yet supported on Snow Leopard (Apple OSX 10.6) in combination with a 64-bits browser like Safari.\n\nIf you would like to use the 3D functionality you should restart your browser in 32-bit mode.\n\nFor instructions on how to run the web browser in 32-bit mode, see the <a href=\"http://kb2.adobe.com/cps/512/cpsid_51273.html\" target=\"messagewindow\">Adobe website</a>."},unityPlayer_Name:{nl_NL:"Unity Web Player",en_US:"Unity Web Player"},unityPlayer_Missing:{nl_NL:"U heeft geen Unity Web Player ge&#239;nstalleerd, deze plugin is nodig om in 3D te kunnen werken.\n\nWilt u naar de website van Unity gaan om de plugin te downloaden?\n\n<b>Let op, voor het installeren van Unity Web Player zijn beheerders rechten nodig.</b>",en_US:"You do not have the Unity Web Player installed, this plugin is required to work with 3D.\n\nWould you like to go to the Unity website to download the latest version?\n\n<b>Attention, installation of the Unity Web Player requires administrator rights.</b>"},unityPlayer_OldVersion:{nl_NL:"Uw Unity Web Player is te oud enkele functies zijn niet beschikbaar of zullen minder goed werken.\n\nWilt u naar de website van Unity gaan om de plugin te downloaden?\n\n<b>Let op, voor het bijwerken van de Unity Web Player zijn beheerders rechten nodig.</b>",en_US:"Your Unity Web Player is too old, some functions are not available or may not work properly.\n\nWould you like to go to the Unity website to download the latest version?\n\n<b>Attention, updating the Unity Web Player requires administrator rights.</b>"},browser_Unsupported:{nl_NL:"De huidige versie van uw web browser wordt niet ondersteund. Er kunnen zich problemen voordoen, met name in de 3D weergave.",en_US:"The current version of your web browser is not supported. Problems may arise, especially while working in 3D."},browser_ShowSupportedVersion:{nl_NL:"De ondersteunde versie is <b>{0}</b>. ",en_US:"The supported version is <b>{0}</b>. "},browser_ShowSupportedVersions:{nl_NL:"De ondersteunde versies zijn <b>{0}</b> en hoger.",en_US:"The supported versions are <b>{0}</b> and higer."},browser_UnsupportedTitle:{nl_NL:"Browser",en_US:"Browser"},alert_Cancel:{nl_NL:"Doorgaan",en_US:"Continue"},alert_Ok:{nl_NL:"Download plugin",en_US:"Download plugin"}}
var FLASH_MINIMAL_RECOMMENDED_VERSION=new Version(9,0,115);var FLASH_LESS_THEN_SUPPORTED_VERSION=new Version(9,0,0);var SHOCKWAVE_MINIMAL_VERSION=new Version(10,6,0);var SHOCKWAVE_MAC_MINIMAL_VERSION=new Version(11,0,0);var SHOCKWAVE_MAC_SAFARI_64BITWARNING_VERSION=new Version(10,6,0);var UNITY_MINIMAL_VERSION=new Version(2,6,0);var MESSAGESERVER_HOST_MINIMAL_WINDOWS_VERSION=new Version(6,0,0);function indgClearLog()
{var theLoggerItems=document.getElementById("myLoggerItems");theLoggerItems.innerHTML="";}
function indgToggleControls(aNode,aType,aShowText,aHideText)
{var theShouldHide=aNode.innerHTML!=aShowText;aNode.innerHTML=theShouldHide?aShowText:aHideText;var theControls=_controlManager.getControls();for(var theIndex=0;theIndex<theControls.length;theIndex++){var theName=theControls[theIndex];var theControl=_controlManager.get(theName);var theType=theControl.getAttribute("indg-type");if(theType.toUpperCase()==aType.toUpperCase())
setControlVisible(theName,!theShouldHide)}}
function indgCreateBrowserDetection()
{var theUserAgent=indgGetTestSettingString("userAgent");var theBrowserDetection=new BrowserDetection();theBrowserDetection.initialize(theUserAgent);if(theUserAgent==null){var thePlatform=indgGetTestSettingString("platform");if(thePlatform!==undefined)
theBrowserDetection.platform=thePlatform;var thePlatformVersion=indgGetTestSettingString("platformVersion");if(thePlatformVersion!==undefined)
theBrowserDetection.platformVersion=com.indg.Util.parseVersionString(thePlatformVersion);var theBrowserId=indgGetTestSettingString("browserId");if(theBrowserId!==undefined)
theBrowserDetection.browserId=theBrowserId;var theBrowserVersion=indgGetTestSettingVersion("browserVersion");if(theBrowserVersion!==undefined)
theBrowserDetection.browserVersion=theBrowserVersion;}
return theBrowserDetection;}
function indgInitializationComplete()
{var theContainer=document.getElementById("myContainer");com.indg.Wrapper.initialize(theContainer);com.indg.Wrapper.load(sSettings);}
function indgInitialize()
{if(sSettings.googleAnalytics!=undefined)
indgIntializeAnalytics(sSettings.googleAnalytics);if(sSettings.dex!=undefined)
indgInitializeDEX(sSettings.dex);if(sSettings.shockwave!=null&&sSettings.unity!=null){alert("Make up your mind, choose either 'Shockwave' or 'Unity'.")
return;}
var theHash=window.location.hash;var theResult=theHash.match(/\/?configuration\/(.*)$/);if(theResult!=null&&theResult.length==2){if(sSettings.startMovieOptions==null||sSettings.startMovieOptions.length==0)
sSettings.startMovieOptions=theResult[1];else
sSettings.startMovieOptions+="&"+decodeURIComponent(theResult[1]);}
if(sSettings.messageServer==undefined)
sSettings.messageServer="localconnection";if(sSettings.filesystem==undefined)
sSettings.filesystem=new Object();if(sSettings.filesystem.dialog==undefined)
sSettings.filesystem.dialog={filter:null,defaultName:null};if(sSettings.debug)
indgSetupLogWindow();var theDefaultLanguage=indgGetTestSettingString("language");if(theDefaultLanguage==undefined)
theDefaultLanguage=com.indg.Util.getSystemLanguage();com.indg.ResourceManager.initialize(indgDefaultResourceBundle,theDefaultLanguage);if(sSettings.debug)
indgShowStatistics();var theBrowserDetection=indgCreateBrowserDetection();com.indg.BrowserDetection=theBrowserDetection;com.indg.Log.info("browser: "+theBrowserDetection);if(theBrowserDetection.browserId=="explorer"&&theBrowserDetection.platformVersion!=null&&!theBrowserDetection.platformVersion.lessThen(MESSAGESERVER_HOST_MINIMAL_WINDOWS_VERSION))
sSettings.messageServer="host";com.indg.Log.info("messageserver... {0}",sSettings.messageServer);indgCheckFlash(theCallback);function theCallback()
{var theSettings=(sSettings.shockwave!=null)?sSettings.shockwave:sSettings.unity;if(theSettings!==undefined&&((theSettings.autoDetect===undefined)||theSettings.autoDetect))
indgCheck3D(indgInitializationComplete);else
indgInitializationComplete();}}
function indgCheckFlash(aCallbackWhenDone)
{var theFlashVersion=indgGetTestSettingVersion("flashVersion");if(theFlashVersion===undefined)
theFlashVersion=com.indg.Util.parseVersionString(getFlashVersionString());var theSettings=sSettings.flash;var theLessThenSupportedVersion=null;if(theSettings!=null&&theSettings.lessThenSupportedVersion!=null)
theLessThenSupportedVersion=com.indg.Util.parseVersionString(theSettings.lessThenSupportedVersion);else
theLessThenSupportedVersion=FLASH_LESS_THEN_SUPPORTED_VERSION;var theMinimalRecommendedVersion=null
if(theSettings!=null&&theSettings.minimalRecommendedVersion!=null)
theMinimalRecommendedVersion=com.indg.Util.parseVersionString(theSettings.minimalRecommendedVersion);else
theMinimalRecommendedVersion=FLASH_MINIMAL_RECOMMENDED_VERSION;if(theFlashVersion==null||theFlashVersion.equals(new Version(0,0,0)))
indgDisplayFlashMissingDialog(onAlertClose);else if(theFlashVersion.lessThen(theLessThenSupportedVersion))
indgDisplayFlashUnsupportedDialog(onAlertClose);else if(theFlashVersion.lessThen(theMinimalRecommendedVersion))
indgDisplayFlashSupportedOldDialog(onAlertClose);else
aCallbackWhenDone();function onAlertClose(aDetail)
{switch(aDetail){case AlertButtons.Cancel:indgLoadPage("http://get.adobe.com/flashplayer/");break;default:aCallbackWhenDone()}}}
function indgCheck3D(aCallbackWhenDone)
{var the3DTypeIsShockwave=(sSettings.shockwave!=null);var theSettings=the3DTypeIsShockwave?sSettings.shockwave:sSettings.unity;if(theSettings==null){aCallbackWhenDone();return;}
var theMinimalVersion=null;if(theSettings.minimalVersion!=null)
theMinimalVersion=com.indg.Util.parseVersionString(theSettings.minimalVersion);var theVersion=null;if(the3DTypeIsShockwave){if(com.indg.BrowserDetection.platform=="mac")
theMinimalVersion=SHOCKWAVE_MAC_MINIMAL_VERSION;else if(theMinimalVersion==null)
theMinimalVersion=SHOCKWAVE_MINIMAL_VERSION;theVersion=indgGet3DVersion(true);com.indg.Wrapper.shockwaveVersion=theVersion;}else{if(theMinimalVersion==null)
theMinimalVersion=UNITY_MINIMAL_VERSION;theVersion=indgGet3DVersion(false);com.indg.Wrapper.unityVersion=theVersion;}
var theBrowserDetection=com.indg.BrowserDetection;var the3DIsRequired=(theSettings.required!==undefined)&&theSettings.required;if(theVersion==null||theVersion.equals(new Version(0,0,0)))
indgDisplay3DMissingDialog(the3DTypeIsShockwave,the3DIsRequired,onAlertClose);else if(the3DTypeIsShockwave&&theBrowserDetection.platform=="mac"&&theBrowserDetection.browserId=="safari"&&theBrowserDetection.platformVersion!=null&&(theBrowserDetection.platformVersion.equals(SHOCKWAVE_MAC_SAFARI_64BITWARNING_VERSION)||SHOCKWAVE_MAC_SAFARI_64BITWARNING_VERSION.lessThen(theBrowserDetection.platformVersion)))
indgDisplay3D64BitWarningDialog(onAlertClose);else if(theVersion.lessThen(theMinimalVersion))
indgDisplay3DSupportedOldDialog(the3DTypeIsShockwave,onAlertClose);else
indgCheckApplicationCompatibility(aCallbackWhenDone);function onAlertClose(aDetail)
{switch(aDetail){case AlertButtons.Cancel:if(the3DTypeIsShockwave)
indgLoadPage("http://get.adobe.com/shockwave/");else
indgLoadPage("http://unity3d.com/webplayer/");break;default:aCallbackWhenDone()}}}
function indgGet3DVersion(aIsShockwave)
{var theVersion=null;if(aIsShockwave){theVersion=indgGetTestSettingVersion("shockwaveVersion");if(theVersion===undefined){var theShockwaveVersionDetector=new ShockwaveVersionDetector();theVersion=theShockwaveVersionDetector.getVersion();}}else{theVersion=indgGetTestSettingVersion("unityVersion");if(theVersion===undefined){var theUnityVersionDetector=new UnityVersionDetector();theVersion=theUnityVersionDetector.getVersion();}}
return theVersion;}
function indgCheckApplicationCompatibility(aCallbackWhenDone)
{var thePlatform=com.indg.BrowserDetection.platform;var thePlatformVersion=com.indg.BrowserDetection.platformVersion;var theBrowserId=com.indg.BrowserDetection.browserId;var theBrowserVersion=com.indg.BrowserDetection.browserVersion;if(thePlatform==null||thePlatformVersion==null||theBrowserId==null||theBrowserVersion==null){aCallbackWhenDone();return;}
if(indgBrowserAndPlatformData===undefined)
throw new Error("Undefined indgBrowserAndPlatformData.");var theSupportedBrowserVersionRanges=undefined;for(var theIndex=0;theIndex<indgBrowserAndPlatformData.length;theIndex++){var theData=indgBrowserAndPlatformData[theIndex];if(theData.platform==thePlatform&&theData.browser==theBrowserId){var thePlatformVersionRanges=com.indg.Util.parseVersionRangeString(theData.platformVersion);var theBrowserVersionRanges=com.indg.Util.parseVersionRangeString(theData.browserVersion);for(var theIndex2=0;theIndex2<thePlatformVersionRanges.length;theIndex2++){var theVersionRange=thePlatformVersionRanges[theIndex2];if(theVersionRange.isInRange(thePlatformVersion)){theSupportedBrowserVersionRanges=theBrowserVersionRanges;break;}}}}
var theBrowserIsSupported=false;if(theSupportedBrowserVersionRanges!=null){for(var theIndex=0;theIndex<theSupportedBrowserVersionRanges.length;theIndex++){if(theSupportedBrowserVersionRanges[theIndex].isInRange(theBrowserVersion)){theBrowserIsSupported=true;break;}}}else{theBrowserIsSupported=true;}
if(theBrowserIsSupported)
aCallbackWhenDone();else
indgDisplayUnsupportedBrowserDialog(theSupportedBrowserVersionRanges,aCallbackWhenDone);}
function indgSetupLogWindow()
{var theLoggerNode=document.createElement("div");theLoggerNode.id="myLogger"
theLoggerNode.innerHTML="<div id=\"myLoggerHeader\"><strong>Debug panel</strong><span onclick=\"indgClearLog()\" style=\"cursor:pointer;\">[Clear]</span> - <button onclick=\"indgToggleControls(this, '3D', 'show shockwaves', 'hide shockwaves');\">hide shockwaves</button><button onclick=\"indgToggleControls(this, 'flash', 'show flashes', 'hide flashes');\">hide flashes</button></div><div id=\"myLoggerItems\"></div>";document.body.appendChild(theLoggerNode);var theContainer=document.getElementById("myContainer");if(theContainer)
theContainer.style.right="400px";com.indg.Log.setLogger(function(aType,aMessage){var theNode=document.getElementById("myLoggerItems");var theLine=document.createElement("div");var theTime=new Date();var theTimeString=theTime.getHours()+":"+theTime.getMinutes()+":"+theTime.getSeconds();var theMessageNode=document.createElement("div");var theTextNode=document.createTextNode(aType+" - "+(theTimeString)+" - "+aMessage);if(aType=="ERROR"){theMessageNode.style.backgroundColor="red";theMessageNode.style.color="yellow";}else if(aType=="INFO"){theMessageNode.style.backgroundColor="green";theMessageNode.style.color="yellow";}else if(aType=="WARNING"){theMessageNode.style.backgroundColor="yellow";theMessageNode.style.color="red";}
theMessageNode.appendChild(theTextNode);theLine.appendChild(theMessageNode);theNode.appendChild(theLine);});}
function indgShowStatistics()
{com.indg.Log.info("Welcome to {0}",sSettings.title);var theString="";for(var theKey in navigator)
theString+=theKey+":= "+navigator[theKey]+"\n";com.indg.Log.info(theString);}
function indgIntializeAnalytics(aAnalyticsSettings)
{if(window._gat!=undefined){window.googleAnalytics=new com.indg.GoogleAnalytics(window._gat,aAnalyticsSettings.code);if(aAnalyticsSettings.prefix!=null)
window.googleAnalytics.prefix=aAnalyticsSettings.prefix;if(aAnalyticsSettings.initialView!=null)
window.googleAnalytics.trackPageview(aAnalyticsSettings.initialView);}}
function indgInitializeDEX(aDEXSettings)
{if(aDEXSettings.url==undefined)
throw new Error("Undefined base URL.");window.dex=new DEX(aDEXSettings.url);}
function indgGetTestSettingString(aName)
{var theSearchString=document.location.search;if(theSearchString.length==0)
return undefined;theSearchString=theSearchString.substr(1);var theArray=theSearchString.split("&");for(var theIndex=0;theIndex<theArray.length;theIndex++){var theNameAndValue=theArray[theIndex].split("=",2);if(theNameAndValue.length==0)
throw new Error();if(theNameAndValue[0]=="_indgTestSetting_"+aName){if(theNameAndValue.length==1)
return null;var theValue=decodeURI(theNameAndValue[1]);if(theValue.length==0)
return null;return theValue;}}
return undefined;}
function indgGetTestSettingVersion(aName)
{var theString=indgGetTestSettingString(aName);if(theString===undefined)
return undefined;if(theString==null)
return null;return com.indg.Util.parseVersionString(theString);}
function indgLoadPage(aUrl)
{var theWindow=window.open(aUrl);if(!theWindow){window.document.location=theUrl;if(window.setFocus!=undefined)
window.setFocus();}}
