// 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;var isSafari=(navigator.userAgent.indexOf("Safari")!=-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||isSafari)
{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;}
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.BrowserDetection={platform:null,os:null,browser:null,version:null,initialize:function(aForceplatform,aForceOS,aForceBrowserType,aForceBrowserVersion)
{if(aForceplatform==null)
this.platform=this.getDataIdentity(this.searchData(this.dataPlatform));else
this.platform=aForceplatform;if(aForceOS==null)
this.OS=this.getDataIdentity(this.searchData(this.dataOS));else
this.OS=aForceOS;if(aForceBrowserType==null)
this.browser=this.getDataIdentity(this.searchData(this.dataBrowser));else
this.browser=aForceBrowserType;if(aForceBrowserVersion==null){var theBrowserData=null;for(var theIndex=0;theIndex<this.dataBrowser.length;theIndex++){if(this.dataBrowser[theIndex].identity==this.browser){theBrowserData=this.dataBrowser[theIndex];break;}}
if(theBrowserData==null)
this.version=0;else
this.version=this.searchVersion([navigator.userAgent,navigator.appVersion],theBrowserData);}else{this.version=parseFloat(aForceBrowserVersion);}},searchData:function(aDataList)
{for(var theIndex=0;theIndex<aDataList.length;theIndex++){var theData=aDataList[theIndex];if(theData.string.indexOf(theData.subString)!=-1)
return theData;}
return null;},getDataIdentity:function(aData)
{if(aData==null)
return null;return aData.identity;},searchVersion:function(theStrings,aBrowserData)
{for(var theIndex=0;theIndex<theStrings.length;theIndex++){if(aBrowserData==null||aBrowserData.versionSubString==null)
throw new Error();var theVersionSearchString=aBrowserData.versionSubString;var theString=theStrings[theIndex];var theStringIndex=theString.indexOf(theVersionSearchString);if(theStringIndex!=-1){var theVersion=parseFloat(theString.substring(theStringIndex+theVersionSearchString.length+1));var thePrecision=aBrowserData.versionPrecision;if(thePrecision==undefined)
return theVersion;return parseInt(theVersion*10*thePrecision)/(10*thePrecision);}}
return-1;},dataBrowser:[{string:navigator.userAgent,subString:"Firefox",identity:"firefox",versionSubString:"Firefox",versionPrecision:10},{string:navigator.appName,subString:"Microsoft",identity:"explorer",versionSubString:"MSIE",versionPrecision:10},{string:navigator.appName,subString:"Opera",identity:"opera",versionSubString:"Opera",versionPrecision:1},{string:navigator.userAgent,subString:"Safari",identity:"safari",versionSubString:"Version",versionPrecision:10}],dataPlatform:[{string:navigator.userAgent,subString:"Windows",identity:"windows"},{string:navigator.userAgent,subString:"Mac",identity:"mac"}],dataOS:[{string:navigator.userAgent,subString:"Windows NT 6",identity:"vista"},{string:navigator.userAgent,subString:"Windows NT 5",identity:"xp"},{string:navigator.userAgent,subString:"Intel Mac OS X 10_4",identity:"osx10.4"},{string:navigator.userAgent,subString:"Intel Mac OS X 10.4",identity:"osx10.4"},{string:navigator.userAgent,subString:"Intel Mac OS X 10_5",identity:"osx10.5"},{string:navigator.userAgent,subString:"Intel Mac OS X 10.5",identity:"osx10.5"},{string:navigator.userAgent,subString:"Intel Mac OS X 10_6",identity:"osx10.6"},{string:navigator.userAgent,subString:"Intel Mac OS X 10.6",identity:"osx10.6"}],toString:function(){var theString="";if(this.browser!=undefined)
theString+=this.browser;if(this.version!=undefined)
theString+=" ("+this.version+")";if(this.OS!=undefined)
theString+=" - "+this.OS;if(this.platform!=undefined)
theString+=" - "+this.platform;if(theString.lenth==0)
theString="unknown"
return theString;}}
com.indg.SupportedBrowsers={browserData:[{browser:"explorer",title:"Internet Explorer",OSlist:["xp"],versions:[6.0,7.0,8.0]},{browser:"explorer",title:"Internet Explorer",OSlist:["vista"],versions:[7.0,8.0]},{browser:"firefox",title:"Firefox",OSlist:["osx10.4","osx10.5","osx10.6"],versions:[2.0,3.6]},{browser:"firefox",title:"Firefox",OSlist:["xp","vista"],versions:[2.0,3.0,3.5,3.6]},{browser:"safari",title:"Safari",OSlist:["xp","vista","osx10.4","osx10.5","osx10.6"],versions:[3.1,3.2,4.0]},{browser:"opera",title:"Opera",OSlist:["xp","vista"],versions:[9.5,9.6]}],isSupported:function(aBrowser,aOS,aVersion){for(var theIndex=0;theIndex<this.browserData.length;theIndex++){var theBrowserData=this.browserData[theIndex];if(theBrowserData.browser==aBrowser&&theBrowserData.OSlist.indexOf(aOS)!=-1&&theBrowserData.versions.indexOf(aVersion)!=-1)
return true;}
return false;},getData:function(aBrowser,aPlatform){for(var theIndex=0;theIndex<this.browserData.length;theIndex++){var theBrowserData=this.browserData[theIndex];if(theBrowserData.browser==aBrowser&&theBrowserData.OSlist.indexOf(aPlatform)!=-1)
return theBrowserData;}
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;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.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;}}
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;theCancelButton.innerHTML="<table style=\"height:100%;width:100%;\"><tr><td>"+this.buttonLabelCancel+"</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;theOkButton.innerHTML="<table style=\"height:100%;width:100%;\"><tr><td>"+this.buttonLabelOk+"</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);}}
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;}}
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;com.indg.ControlManager.prototype._createShockwaveControl=function(aName,aUrl,aOptions)
{var theObjectID="native_"+aName;var theArguments=["src",aUrl,"width","100%","height","100%","bgcolor","#ffffff","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","#ffffff","id",theObjectID,"name",theObjectID,"type","application/vnd.unity","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){alert("Unity sendMessage(), not implemented.");}
return theControl;}
com.indg.ControlManager.prototype._createFlashControl=function(aName,aUrl,aOptions)
{var theObjectID="native_"+aName;var theArguments=["src",aUrl,"width","100%","height","100%","bgcolor","#ffffff","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);if(aOptions!=null)
theArguments=theArguments.concat(aOptions);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;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;}
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,aOptions,aOwnerControlId);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":com.indg.Log.error("Creating an Application Control is unsupported in the online version");break;case"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":theControl=this._createFlashControl(aName,aUrl,aOptions)
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());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);}}
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);}}
function ActionRunner(aCallbackWhenFinished)
{this.actions=new Array();this.callbackWhenFinished=aCallbackWhenFinished;ActionRunner.prototype.run=function()
{var theThis=this;function handleNextAction(){theThis.handleNextAction()}
if(this.actions.length>0){var theAction=this.actions[0];theAction.execute(handleNextAction);}else if(this.callbackWhenFinished!=null){this.callbackWhenFinished.call();}}
ActionRunner.prototype.handleNextAction=function()
{var theThis=this;function handleNextAction(){theThis.handleNextAction()}
if(this.actions!=null){this.actions.shift();if(this.actions.length==0)
this.actions=null;}
if(this.actions==null){if(this.callbackWhenFinished!=null)
this.callbackWhenFinished();return;}
var theAction=this.actions[0];theAction.execute(handleNextAction);}
ActionRunner.prototype.toString=function()
{return"ActionRunnner";}}
function ShockwaveVersionDetector(aForceVersion)
{this.version=null;this.installed=false;ShockwaveVersionDetector.prototype.ShockwaveVersionDetector=function(aForceVersion)
{if(aForceVersion===undefined)
this.version=this.getVersion();else
this.version=aForceVersion;this.installed=(this.version!=null);}
ShockwaveVersionDetector.prototype.hasMinimalVersion=function(aVersionString)
{if(aVersionString==null)
throw new Error("Null version string");if(this.version==null)
return false;var theMinumumVersion=com.indg.Util.parseVersionString(aVersionString);return(theMinumumVersion.lessThen(this.version)||theMinumumVersion.equals(this.version));}
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.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;}
this.ShockwaveVersionDetector(aForceVersion);}
function UnityVersionDetector(aForceVersion)
{this.version=null;this.installed=false;UnityVersionDetector.prototype.UnityVersionDetector=function(aForceVersion)
{if(aForceVersion===undefined)
this.version=this.getVersion();else
this.version=aForceVersion;this.installed=(this.version!=null);}
UnityVersionDetector.prototype.hasMinimalVersion=function(aVersionString)
{if(aVersionString==null)
throw new Error("Null version string");if(this.version==null)
return false;var theMinumumVersion=com.indg.Util.parseVersionString(aVersionString);return(theMinumumVersion.lessThen(this.version)||theMinumumVersion.equals(this.version));}
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()
{return(this.version==null)?"Unity not installed":("Unity "+this.version.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;}
this.UnityVersionDetector(aForceVersion);}
INDG_WRAPPER_VERSION="2.11";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,intialized:false,initialize:function(aParent)
{if(!sSettings.debug)
aParent.innerHTML="";window._controlManager=new com.indg.ControlManager(aParent);window.onbeforeunload=function(aEvent)
{com.indg.Wrapper.onUnload(aEvent==null?event:aEvent);}
var thePreviousWindowOnResize=window.onresize;window.onresize=function(aEvent){if(thePreviousWindowOnResize!=null)
thePreviousWindowOnResize(aEvent);com.indg.Wrapper.onResize(aEvent==null?event:aEvent);}
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=null;if(aSettings.startMovieOptions){theOptions=new Array();theOptions.push("flashVars");theOptions.push(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();}}
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&&shockwaveDetector!=null)
return shockwaveDetector.installed&&sSettings.shockwave.url!=null&&sSettings.shockwave.url.length>0;else if(sSettings.unity!=null&&unityDetector!=null)
return unityDetector.installed&&sSettings.unity.url!=null&&sSettings.unity.url.length>0;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);}catch(theError){com.indg.Log.error(theError.message);}}
function IndgBrowserSupportAction(aBrowserDetection,aSupportedBrowsers)
{this.browserDetection=aBrowserDetection;this.supportedBrowsers=aSupportedBrowsers;IndgBrowserSupportAction.prototype.execute=function(aContinueCallback)
{var theOS=this.browserDetection.OS;if(!this.supportedBrowsers.isSupported(this.browserDetection.browser,theOS,this.browserDetection.version)){var theData=this.supportedBrowsers.getData(this.browserDetection.browser,theOS);var theMessage="";var theId=null;if(theData!=null){theId="browser_UnsupportedVersion";theMessage+=com.indg.ResourceManager.getString("browser_UnsupportedVersion");theMessage+="\n\n<a href=\"javascript:void(0)\" onclick=\"var theElement = document.getElementById('indgBrowserSupportActionList');theElement.style.display = (theElement.style.display == 'none') ? 'block' : 'none';\">";theMessage+=com.indg.ResourceManager.getString("browser_ShowSupportedVersions");theMessage+="</a>";theMessage+="\n<div id=\"indgBrowserSupportActionList\" style=\"display:none;\">"+this.createSupportedVersionList(theOS)+"</div>";}else{theId="browser_Unknown";theMessage+=com.indg.ResourceManager.getString(theId);theMessage+="\n\n<a href=\"javascript:void(0)\" onclick=\"var theElement = document.getElementById('indgBrowserSupportActionList');theElement.style.display = (theElement.style.display == 'none') ? 'block' : 'none';\">";theMessage+=com.indg.ResourceManager.getString("browser_ShowSupported");theMessage+="</a>";theMessage+="\n<div id=\"indgBrowserSupportActionList\" style=\"display:none;\">"+this.createSupportedBrowserList(theOS)+"</div>";}
this.displayDialog(theId,theMessage,aContinueCallback);}else{aContinueCallback();}}
IndgBrowserSupportAction.prototype.createSupportedVersionList=function(aOS)
{var theText="";var theList=new Array();for(var theIndex=0;theIndex<this.supportedBrowsers.browserData.length;theIndex++){var theData=this.supportedBrowsers.browserData[theIndex];if(theData.OSlist.indexOf(aOS)==-1||theData.browser!=this.browserDetection.browser)
continue;theText+=theData.title+" - ";for(var theIndex2=0;theIndex2<theData.versions.length;theIndex2++){if(theIndex2==theData.versions.length-1)
theText+=" "+com.indg.ResourceManager.getString("browser_Or")+" ";else if(theIndex2>0)
theText+=", "
theText+=theData.versions[theIndex2];}}
return theText;}
IndgBrowserSupportAction.prototype.createSupportedBrowserList=function(aOS)
{var theList=new Object();for(var theIndex=0;theIndex<this.supportedBrowsers.browserData.length;theIndex++){var theData=this.supportedBrowsers.browserData[theIndex];if(theData.OSlist.indexOf(aOS)==-1)
continue;for(var theIndex2=0;theIndex2<theData.versions.length;theIndex2++){var theVersionList=theList[theData.title];if(theVersionList==null)
theVersionList=new Array();theVersionList.push(theData.versions[theIndex2]);theList[theData.title]=theVersionList;}}
var theText="<ul>";for(var theName in theList){theText+="<li><b>"+theName+"</b> - "+com.indg.ResourceManager.getString("browser_Version")+" ";var theData=theList[theName];for(var theIndex=0;theIndex<theData.length;theIndex++){if(theIndex>1&&theIndex==theData.length-1)
theText+=" "+com.indg.ResourceManager.getString("browser_And")+" ";else if(theIndex>0)
theText+=", "
theText+=theData[theIndex];}
theText+="</li>"}
theText+="</ul>";return theText;}
IndgBrowserSupportAction.prototype.displayDialog=function(aId,aMessage,aContinueCallback)
{var theSettings=sSettings.playerDetection;if(theSettings==undefined||theSettings.browserCallback==undefined){var theName=com.indg.ResourceManager.getString("browser_UnsupportedTitle");var theAlert=new Alert();theAlert.buttonFlags=AlertButtons.Cancel;theAlert.buttonLabelCancel=com.indg.ResourceManager.getString("browser_Continue");theAlert.show("myDialogMissingPlugin",theName,aMessage,aContinueCallback);}else{theSettings.browserCallback(aId,aContinueCallback,null,false);}}}
function IndgFlashDetectionAction(aCurrentVersion)
{this.currentVersion=aCurrentVersion;this.unsupportedVersion=new Version(9,0,0);this.minimalVersion=new Version(9,0,115);var continueCallback=null;IndgFlashDetectionAction.prototype.execute=function(aContinueCallback)
{continueCallback=aContinueCallback;var theUnsupportedVersion=this.unsupportedVersion;var theMinimalVersion=this.minimalVersion;var theSettings=sSettings.flash;if(theSettings!=undefined){if(theSettings.unsupportedVersion!=undefined)
theUnsupportedVersion=com.indg.Util.parseVersionString(theSettings.unsupportedVersion);if(theSettings.minimalVersion!=undefined)
theMinimalVersion=com.indg.Util.parseVersionString(theSettings.minimalVersion);}
com.indg.BrowserHacks.run("flash.unsupportedVersion",theUnsupportedVersion);com.indg.BrowserHacks.run("flash.minimalVersion",theMinimalVersion);if(this.currentVersion==null||this.currentVersion.equals(new Version(0,0,0)))
this.displayInstallerDialog("flashPlayer_Missing",false);else if(this.currentVersion.lessThen(theUnsupportedVersion))
this.displayInstallerDialog("flashPlayer_NotSupported",false);else if(this.currentVersion.lessThen(theMinimalVersion))
this.displayInstallerDialog("flashPlayer_OldVersion",true);else
continueCallback();}
IndgFlashDetectionAction.prototype.displayInstallerDialog=function(aId,aIsSkippable)
{var theMessage=com.indg.ResourceManager.getString(aId);var theSettings=sSettings.playerDetection;if(theSettings==undefined||theSettings.flashCallback==undefined){var theName=com.indg.ResourceManager.getString("flashPlayer_Name");var theAlert=new Alert();if(aIsSkippable)
theAlert.buttonLabelCancel=com.indg.ResourceManager.getString("browser_Continue");else
theAlert.buttonFlags=AlertButtons.Ok;theAlert.showCloseButton=aIsSkippable;theAlert.buttonLabelOk=com.indg.ResourceManager.getString("flashPlayer_Download");theAlert.show("myDialogMissingPlugin",theName,theMessage,indgDelegate(this,this.onDialogClose));}else{theSettings.flashCallback(aId,indgDelegate(this,onOkFunction),continueCallback,aIsSkippable);}
function onOkFunction()
{this.onDialogClose(AlertDetails.Ok);}}
IndgFlashDetectionAction.prototype.onDialogClose=function(aDetail)
{switch(aDetail){case AlertDetails.Ok:var theUrl="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFull";var theWindow=window.open(theUrl);if(!theWindow){window.document.location=theUrl;if(window.setFocus!=undefined)
window.setFocus();}
break;default:continueCallback();}}}
function IndgShockwaveDetectionAction(aShockwaveDetector,aBrowserDetection)
{this.shockwaveDetector=aShockwaveDetector;this.browserDetection=aBrowserDetection;this.minimalVersion=new Version(10,2,0);var continueCallback=null;IndgShockwaveDetectionAction.prototype.execute=function(aContinueCallback)
{continueCallback=aContinueCallback;var theSettings=sSettings.shockwave;if(theSettings===undefined||(theSettings.autoDetect!=undefined&&!theSettings.autoDetect)){continueCallback();return;}
var theMinimalVersion=this.minimalVersion;if(theSettings!=undefined&&theSettings.minimalVersion!=undefined)
theMinimalVersion=com.indg.Util.parseVersionString(theSettings.minimalVersion);com.indg.BrowserHacks.run("shockwave.version",theMinimalVersion);if(!this.shockwaveDetector.installed){var theCanSkip=(theSettings.skippable==undefined)||theSettings.skippable;this.displayInstallerDialog("shockwavePlayer_Missing",theCanSkip?(AlertButtons.Ok|AlertButtons.Cancel):AlertButtons.Ok);}else if(this.browserDetection.OS=="osx10.6"&&this.browserDetection.browser=="safari"){this.displayInstallerDialog("shockwavePlayer_64BitWarning",AlertButtons.Cancel);}else if(this.shockwaveDetector.version.lessThen(theMinimalVersion)){this.displayInstallerDialog("shockwavePlayer_OldVersion",AlertButtons.Ok|AlertButtons.Cancel);}else{aContinueCallback();}}
IndgShockwaveDetectionAction.prototype.displayInstallerDialog=function(aId,aButtonFlags)
{var theMessage=com.indg.ResourceManager.getString(aId);var theSettings=sSettings.playerDetection;if(theSettings==undefined||theSettings.shockwaveCallback==undefined){var theName=com.indg.ResourceManager.getString("shockwavePlayer_Name");var theAlert=new Alert();theAlert.buttonFlags=aButtonFlags;if((aButtonFlags&AlertButtons.Cancel)==AlertButtons.Cancel)
theAlert.buttonLabelCancel=com.indg.ResourceManager.getString("browser_Continue");if((aButtonFlags&AlertButtons.Ok)==AlertButtons.Ok)
theAlert.buttonLabelOk=com.indg.ResourceManager.getString("shockwavePlayer_Download");theAlert.showCloseButton=(aButtonFlags&AlertButtons.Cancel)==AlertButtons.Cancel;theAlert.show("myDialogMissingPlugin",theName,theMessage,indgDelegate(this,this.onDialogClose));}else{var theIsSkippable=(aButtonFlags&AlertButtons.Cancel)==AlertButtons.Cancel;theSettings.shockwaveCallback(aId,indgDelegate(this,onOkFunction),theIsSkippable?continueCallback:null,theIsSkippable);}
function onOkFunction()
{this.onDialogClose(AlertDetails.Ok);}}
IndgShockwaveDetectionAction.prototype.onDialogClose=function(aDetail)
{switch(aDetail){case AlertDetails.Ok:var theUrl="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFull";var theWindow=window.open(theUrl);if(!theWindow)
window.document.location=theUrl;break;default:continueCallback();}}}
function IndgUnityDetectionAction(aUnityDetector)
{this.unityDetector=aUnityDetector;this.minimalVersion=new Version(2,6,0);var continueCallback=null;IndgUnityDetectionAction.prototype.execute=function(aContinueCallback)
{continueCallback=aContinueCallback;var theSettings=sSettings.unity;if(theSettings===undefined||(theSettings.autoDetect!=undefined&&!theSettings.autoDetect)){continueCallback();return;}
var theMinimalVersion=this.minimalVersion;if(theSettings!=undefined&&theSettings.minimalVersion!=undefined)
theMinimalVersion=com.indg.Util.parseVersionString(theSettings.minimalVersion);com.indg.BrowserHacks.run("unity.version",theMinimalVersion);var theCanSkip=(theSettings.skippable==undefined)||theSettings.skippable;if(!this.unityDetector.installed)
this.displayInstallerDialog("unityPlayer_Missing",theCanSkip);else if(this.unityDetector.version.lessThen(theMinimalVersion))
this.displayInstallerDialog("unityPlayer_OldVersion",true);else
continueCallback();}
IndgUnityDetectionAction.prototype.displayInstallerDialog=function(aId,aIsSkippable)
{var theMessage=com.indg.ResourceManager.getString(aId);var theSettings=sSettings.playerDetection;if(theSettings==undefined||theSettings.unityCallback==undefined){var theName=com.indg.ResourceManager.getString("unityPlayer_Name");var theAlert=new Alert();if(aIsSkippable)
theAlert.buttonLabelCancel=com.indg.ResourceManager.getString("browser_Continue");else
theAlert.buttonFlags=AlertButtons.Ok;theAlert.showCloseButton=aIsSkippable;theAlert.buttonLabelOk=com.indg.ResourceManager.getString("unityPlayer_Download");theAlert.show("myDialogMissingPlugin",theName,theMessage,indgDelegate(this,this.onDialogClose));}else{theSettings.unityCallback(aId,indgDelegate(this,onOkFunction),aIsSkippable?continueCallback:null,aIsSkippable);}
function onOkFunction()
{this.onDialogClose(AlertDetails.Ok);}}
IndgUnityDetectionAction.prototype.onDialogClose=function(aDetail)
{switch(aDetail){case AlertDetails.Ok:var theUrl="http://unity3d.com/webplayer/";var theWindow=window.open(theUrl);if(!theWindow)
window.document.location=theUrl;break;default:continueCallback();}}}
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.browser=="explorer")
return false;var theCurrentBrowserVersion=com.indg.Util.parseVersionString(theBrowserDetection.version.toString());if(theBrowserDetection.browser=="firefox"&&!theCurrentBrowserVersion.lessThen(new Version(3,6,0)))
return false;theControlArguments.push("wmode");theControlArguments.push("opaque");return true;}
com.indg.BrowserHacks.hacks["shockwave.version"]=function(aVersionObject)
{if(aVersionObject==null)
throw new Error("Missing version argument.");if(com.indg.BrowserDetection.platform=="mac"){aVersionObject.major=11;aVersionObject.minor=0;aVersionObject.revision=0;}
return true;}
indgDefaultResourceBundle={flashPlayer_Name:{nl_NL:"Adobe Flash Player",en_US:"Adobe Flash Player"},flashPlayer_Download:{nl_NL:"Download plug-in",en_US:"Download plug-in"},flashPlayer_Missing:{nl_NL:"U heeft geen Adobe Flash Player geinstalleerd, deze plugin is nodig om verder te kunnen gaan.\n\nWilt u naar de website van Adobe gaan om de nieuwste versie te downloaden?\n\n<b>Let op, voor het installeren van de Adobe Flash Player zijn beheerders rechten nodig.</b>",en_US:"You do not have the Adobe Flash Player installed, this plugin is required before continuation.\n\nWould you like to go to the Adobe website to download the latest version?\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 geinstalleerd, 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 beheerders rechten 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_Download:{nl_NL:"Download plug-in",en_US:"Download plug-in"},shockwavePlayer_64BitWarning:{nl_NL:"Momenteel wordt 3D niet ondersteund op Snow Leopard (Apple OSX 10.6).\n\nWilt u toch gebruik maken van de 3D functionaliteit dan dient u uw webbrowser in een alternative modus te draaien.\n\nVoor instructies om de webbrowser in alternative modus te draaien kijk op de <a href=\"http://kb2.adobe.com/cps/512/cpsid_51273.html\" target=\"messagewindow\">Adobe website</a>.",en_US:"At this moment 3D is not yet supported on Snow Leopard (Apple OSX 10.6).\n\nIf you would like to use the 3D functionality you should restart your browser in a alternative mode.\n\nFor instructions to run the webbrowser in alternative modus see the <a href=\"http://kb2.adobe.com/cps/512/cpsid_51273.html\" target=\"messagewindow\">Adobe website</a>."},browser_UnsupportedVersion:{nl_NL:"De huidige versie van uw browser is momenteel in beta. Er kunnen zich nog problemen voordoen, met name in de 3D weergave.",en_US:"The current version of your browser is in beta. Problems may arise, especially while working in 3D."},browser_Unknown:{nl_NL:"Momenteel ondersteunen wij uw browser nog niet volledig. Er kunnen zich mogelijk problemen voordoen, met name in de 3D weergave.",en_US:"Currently we do not fully support your browser. Problems may arise, especially while working in 3D."},browser_ShowSupported:{nl_NL:"Ondersteunde browsers",en_US:"Supported browsers"},browser_ShowSupportedVersions:{nl_NL:"Ondersteunde versies",en_US:"Supported versions"},browser_And:{nl_NL:"en",en_US:"and"},browser_Or:{nl_NL:"of",en_US:"or"},unityPlayer_Name:{nl_NL:"Unity Web Player",en_US:"Unity Web Player"},unityPlayer_Missing:{nl_NL:"U heeft geen Unity Web Player geinstalleerd, 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>"},unityPlayer_Download:{nl_NL:"Download player",en_US:"Download player"},browser_Version:{nl_NL:"versie",en_US:"version"},browser_UnsupportedTitle:{nl_NL:"Browser",en_US:"Browser"},browser_Continue:{nl_NL:"Doorgaan",en_US:"Continue"},browser_VersionTitle:{nl_NL:"Browser versie",en_US:"Browser version"},osx_Unsupported:{nl_NL:"Momenteel wordt 3D niet ondersteund op Snow Leopard (Apple OSX 10.6).\n\nWilt u toch gebruik maken van de 3D functionaliteit dan dient u uw webbrowser in een alternative modus te draaien.\n\nVoor instructies om de webbrowser in alternative modus te draaien kijk op de <a href=\"http://kb2.adobe.com/cps/512/cpsid_51273.html\">Adobe website</a>.",en_US:"At this moment 3D is not yet supported on Snow Leopard (Apple OSX 10.6).\n\nIf you would like to use the 3D functionality you should restart your browser in a alternative mode.\n\nFor instructions to run the webbrowser in alternative modus see the <a href=\"http://kb2.adobe.com/cps/512/cpsid_51273.html\">Adobe website</a>."}}
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 indgOnActionRunnnerFinished()
{if(com.indg.BrowserDetection.browser=="explorer"&&com.indg.BrowserDetection.OS=="vista")
sSettings.messageServer="host";com.indg.Log.info("messageserver... {0}",sSettings.messageServer);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.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+="&"+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();com.indg.BrowserDetection.initialize(indgGetTestSettingString("platform"),indgGetTestSettingString("os"),indgGetTestSettingString("browserType"),indgGetTestSettingVersion("browserVersion"));var theDefaultLanguage=indgGetTestSettingString("language");if(theDefaultLanguage==undefined)
theDefaultLanguage=com.indg.Util.getSystemLanguage();com.indg.ResourceManager.initialize(indgDefaultResourceBundle,theDefaultLanguage);if(sSettings.shockwave!=null)
window.shockwaveDetector=new ShockwaveVersionDetector(indgGetTestSettingVersion("shockwaveVersion"));if(sSettings.unity!=null)
window.unityDetector=new UnityVersionDetector(indgGetTestSettingVersion("unityVersion"));if(sSettings.debug)
indgShowStatistics();var theFlashVersion=indgGetTestSettingVersion("flashVersion");if(theFlashVersion===undefined)
theFlashVersion=com.indg.Util.parseVersionString(getFlashVersionString());var theActionRunner=new ActionRunner(indgOnActionRunnnerFinished);var theActions=new Array();theActions.push(new IndgBrowserSupportAction(com.indg.BrowserDetection,com.indg.SupportedBrowsers));theActions.push(new IndgFlashDetectionAction(theFlashVersion));theActions.push(new IndgShockwaveDetectionAction(window.shockwaveDetector,com.indg.BrowserDetection));theActions.push(new IndgUnityDetectionAction(window.unityDetector));theActionRunner.actions=theActions;theActionRunner.run();}
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);com.indg.Log.info("browser: {0}",com.indg.BrowserDetection.browser);com.indg.Log.info("browser version: {0}",com.indg.BrowserDetection.version);com.indg.Log.info("platform: {0}",com.indg.BrowserDetection.platform);com.indg.Log.info("OS: {0}",com.indg.BrowserDetection.OS);com.indg.Log.info("wrapper version: {0}",com.indg.Wrapper.version);if(window.shockwaveDetector!=null)
com.indg.Log.info("shockwave: {0}",window.shockwaveDetector.version);if(window.unityDetector!=null)
com.indg.Log.info("unity: {0}",window.unityDetector.version);var theString="";for(var i in navigator)
theString+=i+":= "+navigator[i]+"\n";com.indg.Log.debug(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 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("=");if(theNameAndValue.length!=2)
throw new Error();if(theNameAndValue[0]=="_indgTestSetting_"+aName){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);}