var Framework=Framework||{};Framework.IsIE6=function(){return/MSIE (6)/.test(navigator.userAgent)?true:false;};Framework.IsIE7=function(){return/MSIE (7)/.test(navigator.userAgent)?true:false;};Framework.IsIE8=function(){return/MSIE (8)/.test(navigator.userAgent)?true:false;};Framework.IsIE9=function(){return/MSIE (9)/.test(navigator.userAgent)?true:false;};Framework.IsFireFox=function(){return/Firefox/.test(navigator.userAgent)?true:false;};Framework.IsSafari=function(){return/Safari/.test(navigator.userAgent)?true:false;};Framework.IsChrome=function(){return/Chrome/.test(navigator.userAgent)?true:false;};Framework.IsiPad=function(){return/iPad/.test(navigator.platform)?true:false;};Framework.IsiPhone=function(){return/iPhone/.test(navigator.platform)?true:false;};Framework.IsWindowsPhone=function(){return/WP7/.test(navigator.userAgent)?true:false;};Framework.GetElement=function(identifier){var element=null;if(document.getElementById(identifier)!=null){element=document.getElementById(identifier);}else{element=document.getElementsByName(identifier);}return Framework.AttachMethods(element);};Framework.GetElementsByTag=function(tag){var elements=document.getElementsByTagName(tag);for(var index=0;index<elements.length;index++){elements[index]=Framework.AttachMethods(elements[index]);}return elements;};Framework.GetElementsByClass=function(className){var pageElements=document.getElementsByTagName("*");var elements=new Array();for(var index=0;index<pageElements.length;index++){var pageElement=pageElements[index];if(Framework.ElementInheritsCssClass(pageElement,className)){elements.push(Framework.AttachMethods(pageElement));}}return elements;};Framework.CreateElement=function(type){var element=document.createElement(type);return Framework.AttachMethods(element);};Framework.ElementInheritsCssClass=function(element,className){var classNames=element.className.split(" ");for(index=0;index<classNames.length;index++){if(classNames[index]==className){return true;}}return false;};Framework.AttachMethods=function(element){element.GetChildElement=function(identifier){return Framework.GetChildElement(element,identifier);};element.GetChildElementAt=function(index){return Framework.GetChildElementAt(element,index);};element.GetParentElement=function(){return Framework.GetParentElement(element);};element.AddElement=function(child){return Framework.AddElement(element,child);};element.AddElementAt=function(child,index){return Framework.AddElement(element,child,index);};element.GetElement=function(identifier){return Framework.GetElement(identifier);};element.RemoveElement=function(child){Framework.RemoveElement(child);};element.RemoveSelf=function(){Framework.RemoveElement(element);};element.ReplaceElement=function(oldElement,newElement){return Framework.ReplaceElement(element,oldElement,newElement);};element.ReplaceSelf=function(newElement){return Framework.ReplaceElement(element.parentNode,element,newElement);};element.ChangeClassName=function(className){return Framework.ChangeClassName(element,className);};element.ChangeClassNamePart=function(oldClassName,newClassName){return Framework.ChangeClassName(element,oldClassName,newClassName);};element.AppendClassNamePart=function(className){return Framework.AppendClassNamePart(element,className);};return element;};Framework.GetChildElement=function(parentElement,childElementIdentifier){var element=null;if(parentElement.getElementById(identifier)!=null){element=parentElement.getElementById(identifier);}else{element=parentElement.getElementsByName(identifier);}return Framework.AttachMethods(element);};Framework.GetChildElementAt=function(parentElement,index){var childElement=parentElement.childNodes.item[index];return Framework.AttachMethods(childElement);};Framework.GetParentElement=function(element){var parentElement=element.parentNode;return Framework.AttachMethods(parentElement);};Framework.AddElement=function(parentElement,childElement){parentElement.appendChild(childElement);return Framework.AttachMethods(childElement);};Framework.AddElementAt=function(parentElement,childElement,index){if(index<parentElement.childNodes.length){var siblingElement=parentElement.childNodes.item(index+1);parentElement.insertBefore(childElement,siblingElement);}else{parentElement.appendChild(childElement);}return Framework.AttachMethods(childElement);};Framework.RemoveElement=function(element){element.parentNode.removeChild(element);};Framework.ReplaceElement=function(parent,oldElement,newElement){parent.replaceChild(newElement,oldElement);return Framework.AttachMethods(newElement);};Framework.ChangeClassName=function(element,className){element.className=classname;return Framework.AttachMethods(element);};Framework.ChangeClassNamePart=function(element,oldClassName,newClassName){var classNames=element.className.split(" ");for(index=0;index<classNames.length;index++){if(classNames[index]==oldClassName){classNames[index]=newClassName;}}var className=classNames.join(" ");element.className=className;return Framework.AttachMethods(element);};Framework.AppendClassNamePart=function(element,className){var classNames=element.className.split(" ");classNames.push(className);var newClassName=classNames.join(" ");element.className=newClassName;return Framework.AttachMethods(element);};var Framework=Framework||{};Framework.Compatability=Framework.Compatability||{};Framework.Compatability.TestDiv=document.createElement("div");Framework.Compatability.Vendors="Khtml Ms O Moz Webkit".split(" "),Framework.Compatability.VendorsLength=Framework.Compatability.Vendors.length;Framework.Compatability.TagNames={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};Framework.Compatability.SupportsCSS3Feature=function(feature){if(feature in Framework.Compatability.TestDiv.style){return true;}feature=feature.replace(/^[a-z]/,function(val){return val.toUpperCase();});var index=Framework.Compatability.VendorsLength;while(index--){if(Framework.Compatability.Vendors[index]+feature in Framework.Compatability.TestDiv.style){return true;}}return false;};Framework.Compatability.IsEventSupported=function(eventName){var element=document.createElement(Framework.Compatability.TagNames[eventName]||"div");eventName="on"+eventName;var isSupported=(eventName in element);if(!isSupported){element.setAttribute(eventName,"return;");isSupported=typeof element[eventName]=="function";}element=null;return isSupported;};var Framework=Framework||{};Framework.Events=Framework.Events||{};Framework.Events.JavaScriptEvents={CLICK:"click",MOUSE_DOWN:"mousedown",MOUSE_UP:"mouseup",MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout",KEY_UP:"keyup",KEY_DOWN:"keydown",KEY_PRESS:"keypress",FOCUS:"focus",BLUR:"blur",SUBMIT:"submit",ROW_ENTER:"rowenter",ROW_EXIT:"rowexit",AFTER_UPDATE:"afterupdate",BEFORE_UNLOAD:"beforeunload",BEFORE_UPDATE:"beforeupdate",ERROR:"error",ERROR_UPDATE:"errorupdate",LOAD:"load",READY_STATE_CHANGE:"readystatechange",RESIZE:"resize",SCROLL:"scroll",SELECT_START:"selectstart",UNLOAD:"unload"};Framework.Events.MouseEvents={CLICK:"click",MOUSE_DOWN:"mousedown",MOUSE_UP:"mouseup",MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout",MOUSE_MOVE:"mousemove"};Framework.Events.TouchEvents={TOUCH_START:"touchstart",TOUCH_MOVE:"touchmove",TOUCH_END:"touchend",TOUCH_CANCEL:"touchcancel"};Framework.Events.FormElementEvents={FOCUS:"focus",BLUR:"blur",SUBMIT:"submit"};Framework.Events.TableEvents={ROW_ENTER:"rowenter",ROW_EXIT:"rowexit"};Framework.Events.WindowEvents={AFTER_UPDATE:"afterupdate",BEFORE_UNLOAD:"beforeunload",BEFORE_UPDATE:"beforeupdate",DRAG_DROP:"dragdrop",ERROR:"error",ERROR_UPDATE:"errorupdate",LOAD:"load",MOVE:"move",READY_STATE_CHANGE:"readystatechange",RESIZE:"resize",SCROLL:"scroll",SELECT_START:"selectstart",UNLOAD:"unload",ORIENTATION_CHANGE:"orientationchange"};Framework.Events.KeyEvents={KEY_UP:"keyup",KEY_DOWN:"keydown",KEY_PRESS:"keypress"};Framework.Events.KeyCodes={ENTER:13,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,OPEN_BRACKET:91,CLOSE_BRACKET:93,OPEN_PARENTHESES:40,CLOSE_PARENTHESES:41};var Framework=Framework||{};Framework.AddHandler=function(object,eventName,handler){if(object.addEventListener){object.addEventListener(eventName,handler,false);}else{object.attachEvent("on"+eventName,handler);}};Framework.RemoveHandler=function(object,eventName,handler){if(object.removeEventListener){object.removeEventListener(eventName,handler,false);}else{object.detachEvent("on"+eventName,handler);}};Framework.AddWheelHandler=function(handler){if(document.addEventListener){document.addEventListener("DOMMouseScroll",handler,false);document.addEventListener("mousewheel",handler,false);}else{document.attachEvent("onmousewheel",handler);}};Framework.RemoveWheelHandler=function(handler){if(document.removeEventListener){document.removeEventListener("DOMMouseScroll",handler,false);document.removeEventListener("mousewheel",handler,false);}else{document.detachEvent("onmousewheel",handler);}};Framework.CreateDelegate=function(object,method){return(function(){return method.apply(object,arguments);});};var Framework=Framework||{};Framework.CSS=Framework.CSS||{};Framework.CSS.Property={LEFT:"left",TOP:"top",RIGHT:"right",BOTTOM:"bottom"};Framework.CSS.Display={BLOCK:"block",NONE:"none"};Framework.CSS.GetStyleProperty=function(element,property){if(element.currentStyle){return element.currentStyle[property];}else{if(document.defaultView&&document.defaultView.getComputedStyle){return document.defaultView.getComputedStyle(element,"")[property];}else{return element.style[property];}}};var Framework=Framework||{};Framework.Drawing=Framework.Drawing||{};Framework.Drawing.Dimension=function(width,height){this.Width=null;this.Height=null;if(width!=null&&width!=undefined){this.Width=width;}if(height!=null&&height!=undefined){this.Height=height;}};Framework.Drawing.Coordinate=function(posX,posY){this.PositionX=null;this.PositionY=null;if(posX!=null&&posX!=undefined){this.PositionX=posX;}if(posY!=null&&posY!=undefined){this.PositionY=posY;}};var Framework=Framework||{};Framework.Collections=Framework.Collections||{};Framework.Collections.NamedList=function(){this.KeyValuePairs=new Object();this.KeyValuePairIterator=new Array();};Framework.Collections.NamedList.prototype.Add=function(key,value){this.KeyValuePairs[key]=value;this.KeyValuePairIterator.push(key);};Framework.Collections.NamedList.prototype.Remove=function(key){var index=this.FindItemIndex(key);this.RemoveItemAt(index);};Framework.Collections.NamedList.prototype.RemoveItemAt=function(index){if(this.KeyValuePairIterator[index]!=null&&this.KeyValuePairIterator[index]!=undefined){var key=this.KeyValuePairIterator[index];delete this.KeyValuePairs[key];this.KeyValuePairIterator.splice(index,1);}};Framework.Collections.NamedList.prototype.Clear=function(){var listSize=this.KeyValuePairIterator.length;this.KeyValuePairs.splice(0,listSize);this.KeyValuePairIterator.splice(0,listSize);};Framework.Collections.NamedList.prototype.Item=function(key){if(this.KeyValuePairs[key]!=null&&this.KeyValuePairs[key]!=undefined){return this.KeyValuePairs[key];}};Framework.Collections.NamedList.prototype.ItemAt=function(index){if(this.KeyValuePairIterator[index]!=null&&this.KeyValuePairIterator[index]!=undefined){var key=this.KeyValuePairIterator[index];return this.KeyValuePairs[key];}};Framework.Collections.NamedList.prototype.Count=function(){return this.KeyValuePairIterator.length;};Framework.Collections.NamedList.prototype.FindItemIndex=function(key){for(index=0;index<this.KeyValuePairIterator.length;index++){if(this.KeyValuePairIterator[index]==key){return index;}}return -1;};var Framework=Framework||{};Framework.CustomEventHandlingBase=function(){this.Events=new Framework.Collections.NamedList();};Framework.CustomEventHandlingBase.prototype.AddEvent=function(event){var eventHandlerList=new Framework.Collections.NamedList();this.Events.Add(event,eventHandlerList);};Framework.CustomEventHandlingBase.prototype.RemoveEvent=function(event){this.Events.Remove(event);};Framework.CustomEventHandlingBase.prototype.RegisterEventHandler=function(eventHandler){if(this.Events.Item(eventHandler.Event)==null||this.Events.Item(eventHandler.Event)==undefined){this.AddEvent(eventHandler.Event);}this.Events.Item(eventHandler.Event).Add(eventHandler.Name,eventHandler);};Framework.CustomEventHandlingBase.prototype.UnregisterEventHandler=function(eventHandlerName,event){this.Events.Item(event).Remove(eventHandlerName);};Framework.CustomEventHandlingBase.prototype.FireEvent=function(event,eventArgs){var eventToFire=this.Events.Item(event);for(var index=0;index<eventToFire.Count();index++){eventToFire.ItemAt(index).Delegate(eventArgs);}};Framework.CustomEventHandler=function(name,event,delegate){this.Name=null;this.Event=null;this.Delegate=null;if(name!=null&&name!=undefined){this.Name=name;}if(event!=null&&event!=undefined){this.Event=event;}if(delegate!=null&&delegate!=undefined){this.Delegate=delegate;}};var Framework=Framework||{};Framework.Animation=Framework.Animation||{};Framework.Animation.AccelerationType={ZERO:"(elapsedTime * (1 / duration))",SINUSOIDAL:"Math.abs(Math.sin(elapsedTime * (Math.PI / (2 * duration))))",EASE_IN:"Math.pow(((1 /duration) * elapsedTime), 1.25)",EASE_OUT:"Math.pow(((1 /duration) * elapsedTime), .25)",QUADRATIC_EASE_IN:"(elapsedTime /= duration) * elapsedTime",QUADRATIC_EASE_OUT:"-((elapsedTime /= duration) * (elapsedTime -2))",CUBIC_EASE_IN:"(elapsedTime /= duration) * elapsedTime * elapsedTime",CUBIC_EASE_OUT:"(( elapsedTime = elapsedTime/duration - 1) * elapsedTime * elapsedTime + 1)",QUARTIC_EASE_IN:"(elapsedTime /= duration)* elapsedTime * elapsedTime * elapsedTime",QUARTIC_EASE_OUT:"-((elapsedTime = elapsedTime/duration - 1) * elapsedTime * elapsedTime * elapsedTime - 1)",QUINTIC_EASE_IN:"(elapsedTime /= duration) * elapsedTime * elapsedTime * elapsedTime * elapsedTime",QUINTIC_EASE_OUT:"((elapsedTime = elapsedTime/duration - 1) * elapsedTime * elapsedTime * elapsedTime * elapsedTime + 1)",SINUSOIDAL_EASE_IN:"-(Math.cos(elapsedTime/duration * (Math.PI/2)) + c)",SINUSOIDAL_EASE_OUT:"Math.sin(elapsedTime/duration * (Math.PI/2))",CIRCULAR_EASE_IN:"-(Math.sqrt(1 - (elapsedTime /= duration) * elapsedTime) - 1)",CIRCULAR_EASE_OUT:"Math.sqrt(1 - (elapsedTime = elapsedTime / duration - 1) * elapsedTime)",BACK_EASE_IN:"(elapsedTime /= duration) * elapsedTime * ((1.70158 + 1) * elapsedTime - 1.70158)",BACK_EASE_OUT:"((elapsedTime = elapsedTime / duration - 1) * elapsedTime * ((1.70158 + 1) * elapsedTime + 1.70158) + 1)",COSINE:"Math.cos(elapsedTime * (Math.PI / (2 * 300)))",SINE:"Math.sin(elapsedTime * (Math.PI / (2 * 300)))",TANGENT:"Math.tan(elapsedTime * (Math.PI / (2 * 300)))"};Framework.Animation.Dimension=function(width,height){this.Width=null;this.Height=null;if(width!=null&&width!=undefined){this.Width=width;}if(height!=null&&height!=undefined){this.Height=height;}};Framework.Animation.Coordinate=function(posX,posY){this.PositionX=null;this.PositionY=null;if(posX!=null&&posX!=undefined){this.PositionX=posX;}if(posY!=null&&posY!=undefined){this.PositionY=posY;}};Framework.Animation.RGB=function(r,g,b){this.Red=r;this.Green=g;this.Blue=b;};Framework.Animation.Color=function(){this.m_Web=null;this.m_RGB=null;};Framework.Animation.Color.prototype.Web=function(hexValue){if(hexValue!=null&&hexValue!=undefined){this.m_Web=hexValue;this.m_RGB=Framework.Animation.ConvertHexColorToRgb(hexValue);}return this.m_Web;};Framework.Animation.Color.prototype.RGB=function(rgb){if(rgb!=null&&rgb!=undefined){this.m_RGB=rgb;this.m_Web=Framework.Animation.ConvertRgbToHexColor(this.m_RGB);}return this.m_RGB;};Framework.Animation.GetOpacity=function(element){var opacity=100;if(document.attachEvent&&element.currentStyle.filter){var opacityString=element.currentStyle.filter;var matches=opacityString.match(/alpha\(opacity=(\d+)\)/);if(matches.length>0){opacity=(matches[1]/10);}else{opacity=opacity/10;}}else{opacity=(element.style.opacity*10);}return opacity;};Framework.Animation.GetColor=function(element){var color=new Framework.Animation.Color();if(document.attachEvent&&element.currentStyle.backgroundColor){color.Web(element.currentStyle.backgroundColor);}else{color.Web(element.style.backgroundColor);}return color;};Framework.Animation.HexToDecimalMap={"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,A:10,B:11,C:12,D:13,E:14,F:15};Framework.Animation.ConvertHexColorToRgb=function(hexValue){var redHex=hexValue.substr(1,2);var redRgb=Framework.Animation.ConvertHexColorComponentToRgbComponent(redHex);var greenHex=hexValue.substr(3,2);var greenRgb=Framework.Animation.ConvertHexColorComponentToRgbComponent(greenHex);var blueHex=hexValue.substr(5,2);var blueRgb=Framework.Animation.ConvertHexColorComponentToRgbComponent(blueHex);return new Framework.Animation.RGB(redRgb,greenRgb,blueRgb);};Framework.Animation.ConvertHexColorComponentToRgbComponent=function(hexColorComponent){var hex1=Framework.Animation.HexToDecimalMap[hexColorComponent.substr(0,1).toUpperCase()];var hex2=Framework.Animation.HexToDecimalMap[hexColorComponent.substr(1,1).toUpperCase()];var rgb=hex1*16+hex2;return rgb;};Framework.Animation.ConvertRgbToHexColor=function(rgb){var hexColor="#";hexColor=hexColor+Framework.Animation.ConvertRgbComponentToHex(rgb.Red);hexColor=hexColor+Framework.Animation.ConvertRgbComponentToHex(rgb.Green);hexColor=hexColor+Framework.Animation.ConvertRgbComponentToHex(rgb.Blue);return hexColor;};Framework.Animation.ConvertRgbComponentToHex=function(rgbValue){var nybHexString="0123456789ABCDEF";var hexValue=String(nybHexString.substr((rgbValue>>4)&15,1))+nybHexString.substr(rgbValue&15,1);return hexValue;};var Framework=Framework||{};Framework.Animation=Framework.Animation||{};Framework.Animation.AnimationBase=function(){this.m_Element=null;this.m_Duration=null;this.m_Interval=null;this.m_AccelerationType=null;this.m_StartTime=null;this.m_Timer=null;this.OnAnimationStart=null;this.OnAnimationStop=null;this.OnAnimationComplete=null;this.OnAnimationTick=null;};Framework.Animation.AnimationBase.prototype.InitBase=function(element,duration,interval,acceleration){this.m_Element=element;this.m_Duration=duration;this.m_Interval=interval;this.m_AccelerationType=acceleration;};Framework.Animation.AnimationBase.prototype.Start=function(){if(this.OnAnimationStart!=null){this.OnAnimationStart();}this.InitAnimation();this.m_StartTime=0;this.m_Timer=setInterval(Framework.CreateDelegate(this,this.TimerIntervalHandler),this.m_Interval);};Framework.Animation.AnimationBase.prototype.Stop=function(){this.Reset();if(this.OnAnimationStop!=null){this.OnAnimationStop();}};Framework.Animation.AnimationBase.prototype.Reset=function(){clearInterval(this.m_Timer);this.m_Timer=null;};Framework.Animation.AnimationBase.prototype.AnimationComplete=function(){this.Reset();if(this.OnAnimationComplete!=null){this.OnAnimationComplete();}};Framework.Animation.AnimationBase.prototype.GetPercentChange=function(elapsedTime){var duration=this.m_Duration;var change=eval(this.m_AccelerationType);return change;};Framework.Animation.AnimationBase.prototype.InitAnimation=function(){};Framework.Animation.AnimationBase.prototype.Animate=function(percentChange){};Framework.Animation.AnimationBase.prototype.TimerIntervalHandler=function(){var elapsedTime=(this.m_StartTime+=this.m_Interval);var percentChange=this.GetPercentChange(elapsedTime);if(this.OnAnimationTick!=null){this.OnAnimationTick();}if(elapsedTime>=this.m_Duration||percentChange>=1){this.AnimationComplete();}this.Animate(percentChange);};Framework.Animation.ResizeAnimation=function(element,endWidth,endHeight,duration,interval,acceleration){this.m_StartWidth=null;this.m_StartHeight=null;this.m_EndWidth=endWidth;this.m_EndHeight=endHeight;this.m_ChangeWidth=null;this.m_ChangeHeight=null;this.InitBase(element,duration,interval,acceleration);};Framework.Animation.ResizeAnimation.prototype=new Framework.Animation.AnimationBase();Framework.Animation.ResizeAnimation.prototype.InitAnimation=function(){this.m_StartWidth=this.m_Element.clientWidth;this.m_StartHeight=this.m_Element.clientHeight;this.m_ChangeWidth=this.m_EndWidth-this.m_StartWidth;this.m_ChangeHeight=this.m_EndHeight-this.m_StartHeight;};Framework.Animation.ResizeAnimation.prototype.Animate=function(percentChange){this.m_Element.style.height=Math.abs(Math.round(this.m_StartHeight+(percentChange*this.m_ChangeHeight)))+"px";this.m_Element.style.width=Math.abs(Math.round(this.m_StartWidth+(percentChange*this.m_ChangeWidth)))+"px";};Framework.Animation.MoveAnimation=function(element,endPosX,endPosY,duration,interval,acceleration){this.m_StartPosX=null;this.m_StartPosY=null;this.m_EndPosX=endPosX;this.m_EndPosY=endPosY;this.m_ChangeInPosX=null;this.m_ChangeInPosY=null;this.InitBase(element,duration,interval,acceleration);};Framework.Animation.MoveAnimation.prototype=new Framework.Animation.AnimationBase();Framework.Animation.MoveAnimation.prototype.InitAnimation=function(){this.m_StartPosX=this.m_Element.offsetLeft;this.m_StartPosY=this.m_Element.offsetTop;this.m_ChangeInPosX=this.m_EndPosX-this.m_StartPosX;this.m_ChangeInPosY=this.m_EndPosY-this.m_StartPosY;};Framework.Animation.MoveAnimation.prototype.Animate=function(percentChange){this.m_Element.style.left=Math.round(this.m_StartPosX+(percentChange*this.m_ChangeInPosX))+"px";this.m_Element.style.top=Math.round(this.m_StartPosY+(percentChange*this.m_ChangeInPosY))+"px";};Framework.Animation.MoveByAnimation=function(element,changeInPosX,changeInPosY,duration,interval,acceleration){this.m_StartPosX=null;this.m_StartPosY=null;this.m_ChangeInPosX=changeInPosX;this.m_ChangeInPosY=changeInPosY;this.InitBase(element,duration,interval,acceleration);};Framework.Animation.MoveByAnimation.prototype=new Framework.Animation.AnimationBase();Framework.Animation.MoveByAnimation.prototype.InitAnimation=function(){this.m_StartPosX=this.m_Element.offsetLeft;this.m_StartPosY=this.m_Element.offsetTop;};Framework.Animation.MoveByAnimation.prototype.Animate=function(percentChange){this.m_Element.style.left=Math.round(this.m_StartPosX+(percentChange*this.m_ChangeInPosX))+"px";this.m_Element.style.top=Math.round(this.m_StartPosY+(percentChange*this.m_ChangeInPosY))+"px";};Framework.Animation.HorizontalMoveAnimation=function(element,endPosX,duration,interval,acceleration){this.m_StartPosX=null;this.m_EndPosX=endPosX;this.InitBase(element,duration,interval,acceleration);};Framework.Animation.HorizontalMoveAnimation.prototype=new Framework.Animation.AnimationBase();Framework.Animation.HorizontalMoveAnimation.prototype.InitAnimation=function(){this.m_StartPosX=this.m_Element.offsetLeft;this.m_ChangeInPosX=this.m_EndPosX-this.m_StartPosX;};Framework.Animation.HorizontalMoveAnimation.prototype.Animate=function(percentChange){this.m_Element.style.left=Math.round(this.m_StartPosX+(percentChange*this.m_ChangeInPosX))+"px";};Framework.Animation.HorizontalMoveByAnimation=function(element,changeInPosX,duration,interval,acceleration){this.m_StartPosX=null;this.m_ChangeInPosX=changeInPosX;this.InitBase(element,duration,interval,acceleration);};Framework.Animation.HorizontalMoveByAnimation.prototype=new Framework.Animation.AnimationBase();Framework.Animation.HorizontalMoveByAnimation.prototype.InitAnimation=function(){this.m_StartPosX=this.m_Element.offsetLeft;};Framework.Animation.HorizontalMoveByAnimation.prototype.Animate=function(percentChange){this.m_Element.style.left=Math.round(this.m_StartPosX+(percentChange*this.m_ChangeInPosX))+"px";};Framework.Animation.VerticalMoveAnimation=function(element,endPosY,duration,interval,acceleration){this.m_StartPosY=null;this.m_EndPosY=endPosY;this.m_ChangeInPosY=null;this.InitBase(element,duration,interval,acceleration);};Framework.Animation.VerticalMoveAnimation.prototype=new Framework.Animation.AnimationBase();Framework.Animation.VerticalMoveAnimation.prototype.InitAnimation=function(){this.m_StartPosY=this.m_Element.offsetTop;this.m_ChangeInPosY=this.m_EndPosY-this.m_StartPosY;};Framework.Animation.VerticalMoveAnimation.prototype.Animate=function(percentChange){this.m_Element.style.top=Math.round(this.m_StartPosY+(percentChange*this.m_ChangeInPosY))+"px";};Framework.Animation.VerticalMoveByAnimation=function(element,changeInPosY,duration,interval,acceleration){this.m_StartPosY=null;this.m_ChangeInPosY=changeInPosY;this.InitBase(element,duration,interval,acceleration);};Framework.Animation.VerticalMoveByAnimation.prototype=new Framework.Animation.AnimationBase();Framework.Animation.VerticalMoveByAnimation.prototype.InitAnimation=function(){this.m_StartPosY=this.m_Element.offsetTop;};Framework.Animation.VerticalMoveByAnimation.prototype.Animate=function(percentChange){this.m_Element.style.top=Math.round(this.m_StartPosY+(percentChange*this.m_ChangeInPosY))+"px";};Framework.Animation.OpacityAnimation=function(element,endOpacity,duration,interval,acceleration){this.m_StartOpacity=null;this.m_EndOpacity=endOpacity;this.m_ChangeOpacity=null;this.InitBase(element,duration,interval,acceleration);};Framework.Animation.OpacityAnimation.prototype=new Framework.Animation.AnimationBase();Framework.Animation.OpacityAnimation.prototype.InitAnimation=function(){this.m_StartOpacity=Framework.Animation.GetOpacity(this.m_Element);this.m_ChangeOpacity=this.m_EndOpacity-this.m_StartOpacity;};Framework.Animation.OpacityAnimation.prototype.Animate=function(percentChange){var newOpacity=Math.round(this.m_StartOpacity+(percentChange*this.m_ChangeOpacity));this.m_Element.style.filter="alpha(opacity="+(newOpacity*10)+")";this.m_Element.style.opacity=newOpacity/10;};Framework.Animation.ColorAnimation=function(element,endColor,duration,interval,acceleration){this.m_StartColor=null;this.m_EndColor=endColor;this.m_ChangeColor=new Framework.Animation.RGB(null,null,null);this.InitBase(element,duration,interval,acceleration);};Framework.Animation.ColorAnimation.prototype=new Framework.Animation.AnimationBase();Framework.Animation.ColorAnimation.prototype.InitAnimation=function(){this.m_StartColor=Framework.Animation.GetColor(this.m_Element);this.m_ChangeColor.Red=this.m_EndColor.RGB().Red-this.m_StartColor.RGB().Red;this.m_ChangeColor.Green=this.m_EndColor.RGB().Green-this.m_StartColor.RGB().Green;this.m_ChangeColor.Blue=this.m_EndColor.RGB().Blue-this.m_StartColor.RGB().Blue;};Framework.Animation.ColorAnimation.prototype.Animate=function(percentChange){var newColorRgb=new Framework.Animation.RGB(null,null,null);newColorRgb.Red=Math.round(this.m_StartColor.RGB().Red+(percentChange*this.m_ChangeColor.Red));newColorRgb.Green=Math.round(this.m_StartColor.RGB().Green+(percentChange*this.m_ChangeColor.Green));newColorRgb.Blue=Math.round(this.m_StartColor.RGB().Blue+(percentChange*this.m_ChangeColor.Blue));var newColor=new Framework.Animation.Color();newColor.RGB(newColorRgb);this.m_Element.style.backgroundColor=newColor.Web();};var Framework=Framework||{};Framework.Animation=Framework.Animation||{};Framework.Animation.KeyFrameAnimationPlayerOperation={PLAYER_STOP:0,PLAYER_START:1};Framework.Animation.KeyFrameAnimationResizeDimension={WIDTH:0,HEIGHT:1};Framework.Animation.KeyFrameAnimationMozillaPlayerState={HIDE:0,SHOW:1};Framework.Animation.KeyFrameAnimationWmvPlayerState={STOPPED:1,PAUSED:2,PLAYING:3,BUFFERING:6,WAITING:7,TRANSITIONING:9,READY:10};Framework.Animation.KeyFrameAnimationSilverlightPlayerState={STOPPED:"Stopped",PAUSED:"Paused",PLAYING:"Playing",BUFFERING:"Buffering"};Framework.Animation.KeyFrameAnimationEvent={BEGIN:0,PLAY:1,PAUSE:2,STOP:3,END:4,INTERVAL:5};Framework.Animation.KeyFrameAnimationIntervalEventArgs=function(elapsedTime,interval){this.Interval=null;this.ElapsedTime=null;if(interval!=null&&interval!=undefined){this.Interval=interval;}if(elapsedTime!=null&&elapsedTime!=undefined){this.ElapsedTime=elapsedTime;}};Framework.Animation.KeyFrameAnimationEventBase=function(){this.Events=new Array();this.Events[Framework.Animation.KeyFrameAnimationEvent.BEGIN]=new Array();this.Events[Framework.Animation.KeyFrameAnimationEvent.PLAY]=new Array();this.Events[Framework.Animation.KeyFrameAnimationEvent.PAUSE]=new Array();this.Events[Framework.Animation.KeyFrameAnimationEvent.STOP]=new Array();this.Events[Framework.Animation.KeyFrameAnimationEvent.END]=new Array();this.Events[Framework.Animation.KeyFrameAnimationEvent.INTERVAL]=new Array();};Framework.Animation.KeyFrameAnimationEventBase.prototype.RegisterForEvent=function(eventType,delegate){this.Events[eventType].push(delegate);};Framework.Animation.KeyFrameAnimationEventBase.prototype.FireEvent=function(eventType,args){var eventDelegates=this.Events[eventType];for(index=0;index<eventDelegates.length;index++){if(eventDelegates[index]!=null&&eventDelegates[index]!=undefined){eventDelegates[index](args);}}};Framework.Animation.KeyFrameAnimationController=function(duration,interval){this.m_AnimationDuration=duration;this.m_AnimationInterval=interval;this.m_AnimationElapsedTime=0;this.m_AnimationTimer=null;this.m_AnimationState=null;this.m_AnimationIntervalDelegate=Framework.CreateDelegate(this,this.AnimationIntervalHandler);};Framework.Animation.KeyFrameAnimationController.prototype=new Framework.Animation.KeyFrameAnimationEventBase();Framework.Animation.KeyFrameAnimationController.prototype.AnimationIntervalHandler=function(){this.m_AnimationElapsedTime+=this.m_AnimationInterval;if(this.m_AnimationElapsedTime<this.m_AnimationDuration){this.FireEvent(Framework.Animation.KeyFrameAnimationEvent.INTERVAL,new Framework.Animation.KeyFrameAnimationIntervalEventArgs(this.m_AnimationElapsedTime));}else{this.ResetAnimations();this.FireEvent(Framework.Animation.KeyFrameAnimationEvent.END);}};Framework.Animation.KeyFrameAnimationController.prototype.AddAnimation=function(animation){this.RegisterForEvent(Framework.Animation.KeyFrameAnimationEvent.INTERVAL,Framework.CreateDelegate(animation,animation.KeyFrameAnimationIntervalHandler));};Framework.Animation.KeyFrameAnimationController.prototype.ResetAnimations=function(){clearInterval(this.m_AnimationTimer);this.m_AnimationElapsedTime=0;};Framework.Animation.KeyFrameAnimationController.prototype.Play=function(){this.FireEvent(Framework.Animation.KeyFrameAnimationEvent.PLAY);this.m_AnimationTimer=setInterval(this.m_AnimationIntervalDelegate,this.m_AnimationInterval);};Framework.Animation.KeyFrameAnimationController.prototype.Pause=function(){clearInterval(this.m_AnimationTimer);this.FireEvent(Framework.Animation.KeyFrameAnimationEvent.PAUSE);};Framework.Animation.KeyFrameAnimationController.prototype.Stop=function(){this.ResetAnimations();this.UpdateAnimations();this.FireEvent(Framework.Animation.KeyFrameAnimationEvent.STOP);};Framework.Animation.KeyFrameAnimationBase=function(){this.Name=null;this.VisualElement=null;this.StartTime=null;this.EndTime=null;this.ElapsedTime=null;this.Acceleration=null;};Framework.Animation.KeyFrameAnimationBase.prototype.KeyFrameAnimationIntervalHandler=function(animationIntervalEventArgs){this.UpdateAnimations(animationIntervalEventArgs.ElapsedTime);};Framework.Animation.KeyFrameAnimationBase.prototype.InitBase=function(name,element,startTime,endTime,acceleration){this.Name=name;this.VisualElement=element;this.StartTime=startTime;this.EndTime=endTime;this.Acceleration=acceleration;};Framework.Animation.KeyFrameAnimationBase.prototype.UpdateAnimations=function(elapsedTime){this.ElapsedTime=elapsedTime;var percentChange=this.GetPercentChange();if(this.ElapsedTimeIsBetweenKeyFrames()){this.Animate(percentChange);}};Framework.Animation.KeyFrameAnimationBase.prototype.ElapsedTimeIsBetweenKeyFrames=function(){if(this.StartTime<=this.ElapsedTime&&this.EndTime>=this.ElapsedTime){return true;}else{return false;}};Framework.Animation.KeyFrameAnimationBase.prototype.GetPercentChange=function(){var duration=this.EndTime-this.StartTime;var elapsedTime=this.ElapsedTime-this.StartTime;var change=eval(this.Acceleration);return change;};Framework.Animation.KeyFrameAnimationBase.prototype.Animate=function(currentTime){};Framework.Animation.KeyFrameFadeAnimation=function(name,element,startTime,endTime,startOpacity,endOpacity,acceleration){this.StartOpacity=startOpacity;this.EndOpacity=endOpacity;this.InitBase(name,element,startTime,endTime,acceleration);};Framework.Animation.KeyFrameFadeAnimation.prototype=new Framework.Animation.KeyFrameAnimationBase();Framework.Animation.KeyFrameFadeAnimation.prototype.Animate=function(percentChange){var newOpacity=((this.EndOpacity-this.StartOpacity)*percentChange)+this.StartOpacity;this.VisualElement.style.filter="alpha(opacity="+newOpacity*10+")";this.VisualElement.style.opacity=newOpacity/10;};Framework.Animation.KeyFrameMoveAnimation=function(name,element,startTime,endTime,startPos,endPos,acceleration){this.StartPos=startPos;this.EndPos=endPos;this.InitBase(name,element,startTime,endTime,acceleration);};Framework.Animation.KeyFrameMoveAnimation.prototype=new Framework.Animation.KeyFrameAnimationBase();Framework.Animation.KeyFrameMoveAnimation.prototype.Animate=function(percentChange){var newPosX=((this.EndPos-this.StartPos)*percentChange)+this.StartPos;this.VisualElement.style.left=newPosX+"px";};Framework.Animation.KeyFrameResizeAnimation=function(name,element,startTime,endTime,startDim,endDim,dimension,acceleration){this.StartDimension=startDim;this.EndDimension=endDim;this.Dimension=dimension;this.InitBase(name,element,startTime,endTime,acceleration);};Framework.Animation.KeyFrameResizeAnimation.prototype=new Framework.Animation.KeyFrameAnimationBase();Framework.Animation.KeyFrameResizeAnimation.prototype.Animate=function(percentChange){var newDimension=((this.EndDimension-this.StartDimension)*percentChange)+this.StartDimension;if(this.Dimension===Framework.Animation.KeyFrameAnimationResizeDimension.WIDTH){this.VisualElement.style.width=newDimension+"px";}else{this.VisualElement.style.height=newDimension+"px";}};var Framework=Framework||{};Framework.Controls=Framework.Controls||{};Framework.Controls.Trigger=function(triggerElement,triggerEvent,triggerType){this.TriggerElement=triggerElement;this.TriggerEvent=triggerEvent;this.TriggerType=triggerType;this.OnTriggerEvent=null;this.OnTriggerEventWithArgs=null;Framework.AddHandler(this.TriggerElement,this.TriggerEvent,Framework.CreateDelegate(this,this.TriggerElementEventHandler));Framework.AddHandler(this.TriggerElement,this.TriggerEvent,Framework.CreateDelegate(this,this.TriggerElementEventWithArgsHandler));};Framework.Controls.Trigger.prototype.TriggerElementEventHandler=function(){if(this.OnTriggerEvent!=null&&this.OnTriggerEvent!=undefined){this.OnTriggerEvent(this.TriggerType);}};Framework.Controls.Trigger.prototype.TriggerElementEventWithArgsHandler=function(e){if(this.OnTriggerEventWithArgs!=null&&this.OnTriggerEventWithArgs!=undefined){this.OnTriggerEventWithArgs(e);}};Framework.Controls.Coordinate=function(posX,posY){this.PositionX=null;this.PositionY=null;if(posX!=null&&posX!=undefined){this.PositionX=posX;}if(posY!=null&&posY!=undefined){this.PositionY=posY;}};var Framework=Framework||{};Framework.Controls=Framework.Controls||{};Framework.Controls.ButtonControl=function(buttonElement){this.ButtonElement=buttonElement;this.ButtonArgument=null;this.OnButtonClick=null;this.OnButtonMouseOver=null;this.OnButtonMouseOut=null;this.OnButtonEnable=null;this.OnButtonDisable=null;this.ButtonClickDelegate=Framework.CreateDelegate(this,this.ClickHandler);this.ButtonMouseOverDelegate=Framework.CreateDelegate(this,this.MouseOverHandler);this.ButtonMouseOutDelegate=Framework.CreateDelegate(this,this.MouseOutHandler);this.Enable();};Framework.Controls.ButtonControl.prototype.ClickHandler=function(){if(this.OnButtonClick!=null){this.OnButtonClick(this);}};Framework.Controls.ButtonControl.prototype.MouseOverHandler=function(){if(this.OnButtonMouseOver!=null){this.OnButtonMouseOver(this);}};Framework.Controls.ButtonControl.prototype.MouseOutHandler=function(){if(this.OnButtonMouseOut!=null){this.OnButtonMouseOut(this);}};Framework.Controls.ButtonControl.prototype.Enable=function(){Framework.AddHandler(this.ButtonElement,"click",this.ButtonClickDelegate);Framework.AddHandler(this.ButtonElement,"mouseover",this.ButtonMouseOverDelegate);Framework.AddHandler(this.ButtonElement,"mouseout",this.ButtonMouseOutDelegate);if(this.OnButtonEnable!=null){this.OnButtonEnable(this);}};Framework.Controls.ButtonControl.prototype.Disable=function(){Framework.RemoveHandler(this.ButtonElement,"click",this.ButtonClickDelegate);Framework.RemoveHandler(this.ButtonElement,"mouseover",this.ButtonMouseOverDelegate);Framework.RemoveHandler(this.ButtonElement,"mouseout",this.ButtonMouseOutDelegate);if(this.OnButtonDisable!=null){this.OnButtonDisable(this);}};var Framework=Framework||{};Framework.Controls=Framework.Controls||{};Framework.Controls.Page=function(document){alert("!!");Framework.AddHandler(document,Framework.Events.AFTER_UPDATE,Framework.CreateDelegate(this,this.AfterUpdateHandler));Framework.AddHandler(document,Framework.Events.BEFORE_UNLOAD,Framework.CreateDelegate(this,this.BeforeUnloadHandler));Framework.AddHandler(document,Framework.Events.BEFORE_UPDATE,Framework.CreateDelegate(this,this.BeforeUpdateHandler));Framework.AddHandler(document,Framework.Events.DRAG_DROP,Framework.CreateDelegate(this,this.DragDropHandler));Framework.AddHandler(document,Framework.Events.ERROR,Framework.CreateDelegate(this,this.ErrorHandler));Framework.AddHandler(document,Framework.Events.ERROR_UPDATE,Framework.CreateDelegate(this,this.ErrorUpdateHandler));Framework.AddHandler(document,Framework.Events.FOCUS,Framework.CreateDelegate(this,this.FocusHandler));Framework.AddHandler(document,Framework.Events.LOAD,Framework.CreateDelegate(this,this.LoadHandler));Framework.AddHandler(document,Framework.Events.MOVE,Framework.CreateDelegate(this,this.MoveHandler));Framework.AddHandler(document,Framework.Events.READY_STATE_CHANGE,Framework.CreateDelegate(this,this.ReadyStateChangeHandler));Framework.AddHandler(document,Framework.Events.RESIZE,Framework.CreateDelegate(this,this.ResizeHandler));Framework.AddHandler(document,Framework.Events.SCROLL,Framework.CreateDelegate(this,this.ScrollHandler));Framework.AddHandler(document,Framework.Events.SELECT_START,Framework.CreateDelegate(this,this.SelectStartHandler));Framework.AddHandler(document,Framework.Events.UNLOAD,Framework.CreateDelegate(this,this.UnloadHandler));};Framework.Controls.Page.prototype.AfterUpdateHandler=function(){};Framework.Controls.Page.prototype.BeforeUnloadHandler=function(){};Framework.Controls.Page.prototype.BeforeUpdateHandler=function(){};Framework.Controls.Page.prototype.DragDropHandler=function(){};Framework.Controls.Page.prototype.ErrorHandler=function(){};Framework.Controls.Page.prototype.ErrorUpdateHandler=function(){};Framework.Controls.Page.prototype.FocusHandler=function(){};Framework.Controls.Page.prototype.LoadHandler=function(){alert("!!!!");};Framework.Controls.Page.prototype.MoveHandler=function(){};Framework.Controls.Page.prototype.ReadyStateChangeHandler=function(){};Framework.Controls.Page.prototype.ResizeHandler=function(){};Framework.Controls.Page.prototype.ScrollHandler=function(){};Framework.Controls.Page.prototype.SelectStartHandler=function(){};Framework.Controls.Page.prototype.UnloadHandler=function(){};var Framework=Framework||{};Framework.Controls=Framework.Controls||{};Framework.Controls.DraggableObjectDirection={VERTICAL:0,HORIZONTAL:1,BOTH:2};Framework.Controls.DraggableObjectAnchor={TOP:"top",BOTTOM:"bottom",LEFT:"left",RIGHT:"right"};Framework.Controls.DraggableObjectBase=function(){this.PageElement=null;this.DraggableElement=null;this.Direction=null;this.VerticalAnchor=null;this.HorizontalAnchor=null;this.PreventDefault=false;this.LastMousePositionX=null;this.LastMousePositionY=null;this.MouseDownDelegate=null;this.MouseUpDelegate=null;this.MouseMoveDelegate=null;this.OnDragStart=null;this.OnDragEnd=null;this.OnDrag=null;};Framework.Controls.DraggableObjectBase.prototype.InitDraggableObjectBase=function(element,direction,verticalAnchor,horizontalAnchor,preventDefault){this.PageElement=(document.addEventListener)?window:document.body;this.DraggableElement=element;this.Direction=direction;this.VerticalAnchor=verticalAnchor;this.HorizontalAnchor=horizontalAnchor;this.PreventDefault=preventDefault;this.MouseDownDelegate=Framework.CreateDelegate(this,this.MouseDownHandler);this.MouseUpDelegate=Framework.CreateDelegate(this,this.MouseUpHandler);this.MouseMoveDelegate=Framework.CreateDelegate(this,this.MouseMoveHandler);Framework.AddHandler(this.DraggableElement,Framework.Events.MouseEvents.MOUSE_DOWN,this.MouseDownDelegate);Framework.AddHandler(this.DraggableElement,Framework.Events.TouchEvents.TOUCH_START,this.MouseDownDelegate);};Framework.Controls.DraggableObjectBase.prototype.Move=function(coordinates){if(this.Direction==Framework.Controls.DraggableObjectDirection.HORIZONTAL||this.Direction==Framework.Controls.DraggableObjectDirection.BOTH){var x=this.DraggableElement.offsetLeft+coordinates.PositionX;this.DraggableElement.style.left=x+"px";}if(this.Direction==Framework.Controls.DraggableObjectDirection.VERTICAL||this.Direction==Framework.Controls.DraggableObjectDirection.BOTH){var y=0;if(this.VerticalAnchor==Framework.Controls.DraggableObjectAnchor.BOTTOM){y=this.DraggableElement.offsetBottom+coordinates.PositionY;this.DraggableElement.style.bottom=y+"px";}else{y=this.DraggableElement.offsetTop+coordinates.PositionY;this.DraggableElement.style.top=y+"px";}}};Framework.Controls.DraggableObjectBase.prototype.ClearSelection=function(){if(window.getSelection){window.getSelection().removeAllRanges();}else{document.selection.empty();}};Framework.Controls.DraggableObjectBase.prototype.MouseDownHandler=function(e){e=e||window.event;if(this.OnDragStart!=null){this.OnDragStart();}this.LastMousePositionX=e.clientX?e.clientX:e.changedTouches[0].pageX;this.LastMousePositionY=e.clientY?e.clientY:e.changedTouches[0].pageY;Framework.AddHandler(window,Framework.Events.MouseEvents.MOUSE_UP,this.MouseUpDelegate);Framework.AddHandler(window,Framework.Events.TouchEvents.TOUCH_END,this.MouseUpDelegate);Framework.AddHandler(this.PageElement,Framework.Events.MouseEvents.MOUSE_MOVE,this.MouseMoveDelegate);Framework.AddHandler(this.PageElement,Framework.Events.TouchEvents.TOUCH_MOVE,this.MouseMoveDelegate);};Framework.Controls.DraggableObjectBase.prototype.MouseUpHandler=function(){Framework.RemoveHandler(window,Framework.Events.MouseEvents.MOUSE_UP,this.MouseUpDelegate);Framework.RemoveHandler(window,Framework.Events.TouchEvents.TOUCH_END,this.MouseUpDelegate);Framework.RemoveHandler(this.PageElement,Framework.Events.MouseEvents.MOUSE_MOVE,this.MouseMoveDelegate);Framework.RemoveHandler(this.PageElement,Framework.Events.TouchEvents.TOUCH_MOVE,this.MouseMoveDelegate);this.ClearSelection();if(this.OnDragEnd!=null){this.OnDragEnd();}};Framework.Controls.DraggableObjectBase.prototype.MouseMoveHandler=function(e){e=e||window.event;var posX=e.clientX?e.clientX:e.changedTouches[0].pageX;var posY=e.clientY?e.clientY:e.changedTouches[0].pageY;var coordinateDelta=new Framework.Controls.Coordinate();coordinateDelta.PositionX=posX-this.LastMousePositionX;coordinateDelta.PositionY=posY-this.LastMousePositionY;this.LastMousePositionX=posX;this.LastMousePositionY=posY;if(this.OnDrag!=null){this.OnDrag(coordinateDelta);}};Framework.Controls.DraggableObject=function(element,direction,verticalAnchor,horizontalAnchor,preventDefault){this.OnDrag=Framework.CreateDelegate(this,this.DragHandler);this.InitDraggableObjectBase(element,direction,verticalAnchor,horizontalAnchor,preventDefault);};Framework.Controls.DraggableObject.prototype=new Framework.Controls.DraggableObjectBase();Framework.Controls.DraggableObject.prototype.DragHandler=function(coordinateDelta){};var Framework=Framework||{};Framework.Controls=Framework.Controls||{};Framework.Controls.CollapsiblePanelTriggerType={EXPAND:0,COLLAPSE:1,BOTH:2,NONE:3};Framework.Controls.CollapsiblePanelState={EXPANDED:0,COLLAPSED:1,ANIMATING:2};Framework.Controls.CollapsiblePanelStartState={EXPANDED:true,COLLAPSED:false};Framework.Controls.CollapsiblePanelExpansionAllowedSetting={YES:true,NO:false};Framework.Controls.CollapsiblePanelEnabled={YES:true,NO:false};Framework.Controls.CollapsiblePanel=function(panel,trigger,minWidth,minHeight,maxWidth,maxHeight,duration,interval,acceleration,expanded,allowExpansion){this.m_PanelState=null;this.m_Panel=panel;this.m_Trigger=trigger;this.m_AllowExpansion=allowExpansion;this.m_Enabled=Framework.Controls.CollapsiblePanelEnabled.YES;this.OnExpandStart=null;this.OnExpandComplete=null;this.OnCollapseStart=null;this.OnCollapseComplete=null;if(expanded){this.m_PanelState=Framework.Controls.CollapsiblePanelState.EXPANDED;this.SetDimensions(maxWidth,maxHeight);}else{this.m_PanelState=Framework.Controls.CollapsiblePanelState.COLLAPSED;this.SetDimensions(minWidth,minHeight);}this.m_ExpandAnimation=new Framework.Animation.ResizeAnimation(this.m_Panel,maxWidth,maxHeight,duration,interval,acceleration);this.m_ExpandAnimation.OnAnimationComplete=Framework.CreateDelegate(this,this.ExpandComplete);this.m_CollapseAnimation=new Framework.Animation.ResizeAnimation(this.m_Panel,minWidth,minHeight,duration,interval,acceleration);this.m_CollapseAnimation.OnAnimationComplete=Framework.CreateDelegate(this,this.CollapseComplete);if(trigger!=null){this.AddTrigger(trigger);}};Framework.Controls.CollapsiblePanel.prototype.OnTriggerHandler=function(triggerType){if(this.m_Enabled==Framework.Controls.CollapsiblePanelEnabled.NO){return;}if(this.m_PanelState==Framework.Controls.CollapsiblePanelState.ANIMATING){return;}if(triggerType==Framework.Controls.CollapsiblePanelTriggerType.NONE){return;}if(this.m_PanelState==Framework.Controls.CollapsiblePanelState.EXPANDED){if(triggerType!=Framework.Controls.CollapsiblePanelTriggerType.EXPAND){this.Collapse();}}else{if(triggerType!=Framework.Controls.CollapsiblePanelTriggerType.COLLAPSE){this.Expand();}}};Framework.Controls.CollapsiblePanel.prototype.AddTrigger=function(trigger){trigger.OnTriggerEvent=Framework.CreateDelegate(this,this.OnTriggerHandler);};Framework.Controls.CollapsiblePanel.prototype.Expand=function(){if(this.OnExpandStart!=null){this.OnExpandStart();}this.m_PanelState=Framework.Controls.CollapsiblePanelState.ANIMATING;this.m_ExpandAnimation.Start();};Framework.Controls.CollapsiblePanel.prototype.Collapse=function(){if(this.CollapseStart!=null){this.OnCollapseStart();}this.m_PanelState=Framework.Controls.CollapsiblePanelState.ANIMATING;this.m_Panel.style.minHeight="";this.m_CollapseAnimation.Start();};Framework.Controls.CollapsiblePanel.prototype.ExpandComplete=function(){if(this.OnExpandComplete!=null){this.OnExpandComplete(this);}this.m_PanelState=Framework.Controls.CollapsiblePanelState.EXPANDED;if(this.m_AllowExpansion){this.AllowForExpansion();}};Framework.Controls.CollapsiblePanel.prototype.CollapseComplete=function(){if(this.OnCollapseComplete!=null){this.OnCollapseComplete(this);}this.m_PanelState=Framework.Controls.CollapsiblePanelState.COLLAPSED;};Framework.Controls.CollapsiblePanel.prototype.SetDimensions=function(width,height){this.m_Panel.style.height=height+"px";this.m_Panel.style.width=width+"px";};Framework.Controls.CollapsiblePanel.prototype.AllowForExpansion=function(){this.m_Panel.style.minHeight=this.m_Panel.style.height;this.m_Panel.style.height="";};var Framework=Framework||{};Framework.Controls=Framework.Controls||{};Framework.Controls.CarouselOrientation={HORIZONTAL:0,VERTICAL:1};Framework.Controls.CarouselDirection={FORWARD:0,REVERSE:1};Framework.Controls.CarouselEvent={FORWARD:"forward",REVERSE:"reverse",COMPLETE:"complete"};Framework.Controls.CarouselBase=function(){this.ContentDiv=null;this.MaskDiv=null;this.OffsetStart=null;this.OffsetEnd=null;this.ForwardAnimation=null;this.ReverseAnimation=null;this.AnimationAcceleration=Framework.Animation.AccelerationType.QUADRATIC_EASE_OUT;this.AddEvent(Framework.Controls.CarouselEvent.FORWARD);this.AddEvent(Framework.Controls.CarouselEvent.REVERSE);this.AddEvent(Framework.Controls.CarouselEvent.COMPLETE);};Framework.Controls.CarouselBase.prototype=new Framework.CustomEventHandlingBase();Framework.Controls.CarouselBase.prototype.InitBase=function(contentDiv,maskDiv,offsetStart,offsetEnd){this.ContentDiv=contentDiv;this.MaskDiv=maskDiv;this.OffsetStart=offsetStart;this.OffsetEnd=offsetEnd;};Framework.Controls.CarouselBase.prototype.AddButton=function(button,direction){if(direction==Framework.Controls.CarouselDirection.FORWARD){button.OnButtonClick=Framework.CreateDelegate(this,this.Forward);}else{button.OnButtonClick=Framework.CreateDelegate(this,this.Reverse);}this.RegisterEventHandler(new Framework.CustomEventHandler(button.ButtonElement.id+Framework.Controls.CarouselEvent.FORWARD,Framework.Controls.CarouselEvent.FORWARD,Framework.CreateDelegate(button,button.Disable)));this.RegisterEventHandler(new Framework.CustomEventHandler(button.ButtonElement.id+Framework.Controls.CarouselEvent.REVERSE,Framework.Controls.CarouselEvent.REVERSE,Framework.CreateDelegate(button,button.Disable)));this.RegisterEventHandler(new Framework.CustomEventHandler(button.ButtonElement.id+Framework.Controls.CarouselEvent.COMPLETE,Framework.Controls.CarouselEvent.COMPLETE,Framework.CreateDelegate(button,button.Enable)));};Framework.Controls.CarouselBase.prototype.CheckForwardBoundary=function(offset,contentDimension,maskDimension){if(offset<=-(contentDimension-maskDimension)){return false;}else{return true;}};Framework.Controls.CarouselBase.prototype.CheckReverseBoundary=function(offset){if(offset==this.OffsetStart){return false;}else{return true;}};Framework.Controls.CarouselBase.prototype.StepAnimationCompleteHandler=function(){this.FireEvent(Framework.Controls.CarouselEvent.COMPLETE);};Framework.Controls.CarouselBase.prototype.Reverse=function(){};Framework.Controls.CarouselBase.prototype.Forward=function(){};Framework.Controls.HorizontalCarousel=function(contentDiv,maskDiv,increment,itemCount,duration,interval){this.ForwardAnimation=new Framework.Animation.HorizontalMoveByAnimation(contentDiv,-increment,duration,interval,this.AnimationAcceleration);this.ForwardAnimation.OnAnimationComplete=Framework.CreateDelegate(this,this.StepAnimationCompleteHandler);this.ReverseAnimation=new Framework.Animation.HorizontalMoveByAnimation(contentDiv,increment,duration,interval,this.AnimationAcceleration);this.ReverseAnimation.OnAnimationComplete=Framework.CreateDelegate(this,this.StepAnimationCompleteHandler);this.InitBase(contentDiv,maskDiv,contentDiv.offsetLeft,contentDiv.offsetLeft);};Framework.Controls.HorizontalCarousel.prototype=new Framework.Controls.CarouselBase();Framework.Controls.HorizontalCarousel.prototype.Reverse=function(){if(!this.CheckReverseBoundary()){return;}this.FireEvent(Framework.Controls.CarouselEvent.FORWARD);this.ReverseAnimation.Start();};Framework.Controls.HorizontalCarousel.prototype.Forward=function(){if(!this.CheckForwardBoundary(this.ContentDiv.offsetLeft,this.ContentDiv.clientWidth,this.MaskDiv.clientWidth)){return;}this.FireEvent(Framework.Controls.CarouselEvent.REVERSE);this.ForwardAnimation.Start();};Framework.Controls.VerticalCarousel=function(contentDiv,maskDiv,increment,itemCount,duration,interval){this.ForwardAnimation=new Framework.Animation.VerticalMoveByAnimation(contentDiv,increment,duration,interval,this.AnimationAcceleration);this.ForwardAnimation.OnAnimationComplete=Framework.CreateDelegate(this,this.StepAnimationCompleteHandler);this.ReverseAnimation=new Framework.Animation.VerticalMoveByAnimation(contentDiv,-increment,duration,interval,this.AnimationAcceleration);this.ReverseAnimation.OnAnimationComplete=Framework.CreateDelegate(this,this.StepAnimationCompleteHandler);this.InitBase(contentDiv,maskDiv,contentDiv.offsetTop,contentDiv.offsetTop);};Framework.Controls.VerticalCarousel.prototype=new Framework.Controls.CarouselBase();Framework.Controls.VerticalCarousel.prototype.Reverse=function(){if(!this.CheckReverseBoundary(this.ContentDiv.offsetTop)){return;}this.FireEvent(Framework.Controls.CarouselEvent.FORWARD);this.ReverseAnimation.Start();};Framework.Controls.VerticalCarousel.prototype.Forward=function(){if(!this.CheckForwardBoundary(this.ContentDiv.offsetTop,this.ContentDiv.clientHeight,this.MaskDiv.clientHeight)){return;}this.FireEvent(Framework.Controls.CarouselEvent.REVERSE);this.ForwardAnimation.Start();};var Framework=Framework||{};Framework.Controls=Framework.Controls||{};Framework.Controls.GesturalScrollerState={STATIC:0,DRAGGING:1,ANIMATING:2};Framework.Controls.GesturalScrollerBase=function(){this.ScrollingElement=null;this.MaskElement=null;this.OffsetStart=null;this.GesturalScrollerState=Framework.Controls.GesturalScrollerState.STATIC;this.AccelerationCheckTimer=null;this.AccelerationCheckPosOverTime1=0;this.AccelerationCheckPosOverTime2=0;this.AccelerationCheckPos1=0;this.AccelerationCheckPos2=0;this.AccelerationCheckTime1=0;this.AccelerationCheckTime2=0;this.AnimationBoundaryCheckPos=0;this.ScrollAcceleration=null;this.ScrollInterval=null;this.ScrollIncrementBase=null;this.ScrollDurationBase=null;this.OnScrollerDragStart=null;this.OnScrollerDragEnd=null;this.OnScrollerDrag=null;this.OnScrollerAnimationStart=null;this.OnScrollerAnimationEnd=null;this.OnScrollerAnimation=null;this.OnScrollerCanScrollPrevious=null;this.OnScrollerCannotScrollPrevious=null;this.OnScrollerCanScrollNext=null;this.OnScrollerCannotScrollNext=null;this.OnScroll=null;this.OnScrollEnd=null;this.TimerTickDelegate=null;this.OnDragStart=null;this.OnDragEnd=null;this.OnDrag=null;this.ScrollAnimation=null;};Framework.Controls.GesturalScrollerBase.prototype=new Framework.Controls.DraggableObjectBase();Framework.Controls.GesturalScrollerBase.prototype.InitGesturalScollerBase=function(scrollingElement,maskElement,offsetStart,direction,animation){this.ScrollingElement=scrollingElement;this.MaskElement=maskElement;this.OffsetStart=offsetStart;this.ScrollAnimation=animation;this.ScrollAnimation.OnAnimationStart=Framework.CreateDelegate(this,this.AnimationStartHandler);this.ScrollAnimation.OnAnimationStop=Framework.CreateDelegate(this,this.AnimationStopHandler);this.ScrollAnimation.OnAnimationComplete=Framework.CreateDelegate(this,this.AnimationEndHandler);this.ScrollAnimation.OnAnimationTick=Framework.CreateDelegate(this,this.AnimationTickHandler);this.TimerTickDelegate=Framework.CreateDelegate(this,this.TimerTickHandler);this.OnDragStart=Framework.CreateDelegate(this,this.DragStartHandler);this.OnDragEnd=Framework.CreateDelegate(this,this.DragEndHandler);this.OnDrag=Framework.CreateDelegate(this,this.DragHandler);this.InitDraggableObjectBase(this.ScrollingElement,direction,Framework.Controls.DraggableObjectAnchor.TOP,Framework.Controls.DraggableObjectAnchor.LEFT,false);};Framework.Controls.GesturalScrollerBase.prototype.ScrollContent=function(distance){};Framework.Controls.GesturalScrollerBase.prototype.ResetContent=function(){};Framework.Controls.GesturalScrollerBase.prototype.AdjustDistanceForDirection=function(distance){var directionalDistance=(this.AccelerationCheckPos2-this.AccelerationCheckPos1>0)?distance:-distance;return directionalDistance;};Framework.Controls.GesturalScrollerBase.prototype.CancelScroll=function(){if(this.GesturalScrollerState==Framework.Controls.GesturalScrollerState.DRAGGING){this.OnDragEnd=null;this.MouseUpHandler();this.OnDragEnd=Framework.CreateDelegate(this,this.DragEndHandler);}if(this.GesturalScrollerState==Framework.Controls.GesturalScrollerState.ANIMATING){this.ScrollAnimation.Stop();}};Framework.Controls.GesturalScrollerBase.prototype.CheckBoundaries=function(coordinates){};Framework.Controls.GesturalScrollerBase.prototype.CheckForwardBoundary=function(offset,contentDimension,maskDimension){if(offset<=-(contentDimension-maskDimension)){if(this.OnScrollerCannotScrollNext!=null){this.OnScrollerCannotScrollNext();}return false;}else{return true;}};Framework.Controls.GesturalScrollerBase.prototype.CheckReverseBoundary=function(offset){if(offset>=this.OffsetStart){if(this.OnScrollerCannotScrollPrevious!=null){this.OnScrollerCannotScrollPrevious();}return false;}else{return true;}};Framework.Controls.GesturalScrollerBase.prototype.StartTimer=function(){if(this.AccelerationCheckTimer==null){this.AccelerationCheckTimer=setInterval(this.TimerTickDelegate,100);}};Framework.Controls.GesturalScrollerBase.prototype.StopTimer=function(){if(this.AccelerationCheckTimer!=null){clearInterval(this.AccelerationCheckTimer);this.AccelerationCheckTimer=null;}};Framework.Controls.GesturalScrollerBase.prototype.TimerTickHandler=function(){};Framework.Controls.GesturalScrollerBase.prototype.DragStartHandler=function(e){if(this.GesturalScrollerState==Framework.Controls.GesturalScrollerState.ANIMATING){this.ScrollAnimation.Stop();}this.GesturalScrollerState=Framework.Controls.GesturalScrollerState.DRAGGING;this.StartTimer();};Framework.Controls.GesturalScrollerBase.prototype.DragEndHandler=function(e){this.GesturalScrollerState=Framework.Controls.GesturalScrollerState.STATIC;this.StopTimer();if(this.AccelerationCheckPosOverTime2-this.AccelerationCheckPosOverTime1==0){return;}var distanceMultiplier=(Framework.IsiPad())?300:200;var distance=Math.pow((1+(1/(this.AccelerationCheckTime2-this.AccelerationCheckTime1))*distanceMultiplier),2);if(this.AccelerationCheckTime2>0){this.AccelerationCheckTime1=0;this.AccelerationCheckTime2=0;distance=300;var directionalDistance=this.AdjustDistanceForDirection(distance);this.ScrollContent(directionalDistance);}};Framework.Controls.GesturalScrollerBase.prototype.DragHandler=function(coordinates){};Framework.Controls.GesturalScrollerBase.prototype.AnimationStartHandler=function(){this.GesturalScrollerState=Framework.Controls.GesturalScrollerState.ANIMATING;};Framework.Controls.GesturalScrollerBase.prototype.AnimationStopHandler=function(){this.GesturalScrollerState=Framework.Controls.GesturalScrollerState.STATIC;};Framework.Controls.GesturalScrollerBase.prototype.AnimationEndHandler=function(){this.GesturalScrollerState=Framework.Controls.GesturalScrollerState.STATIC;};Framework.Controls.GesturalScrollerBase.prototype.AnimationTickHandler=function(){};Framework.Controls.HorizontalGesturalScroller=function(scrollingElement,maskElement){this.InitGesturalScollerBase(scrollingElement,maskElement,scrollingElement.offsetLeft,Framework.Controls.DraggableObjectDirection.HORIZONTAL,new Framework.Animation.HorizontalMoveByAnimation(this.ScrollingElement,-this.ScrollIncrementBase,this.ScrollDurationBase,this.ScrollInterval,this.ScrollAcceleration));};Framework.Controls.HorizontalGesturalScroller.prototype=new Framework.Controls.GesturalScrollerBase();Framework.Controls.HorizontalGesturalScroller.prototype.ScrollContent=function(distance){this.ScrollAnimation.m_Element=this.ScrollingElement;this.ScrollAnimation.m_Duration=this.ScrollDurationBase;this.ScrollAnimation.m_Interval=this.ScrollInterval;this.ScrollAnimation.m_AccelerationType=this.ScrollAcceleration;this.ScrollAnimation.m_ChangeInPosX=distance;this.ScrollAnimation.Start();};Framework.Controls.HorizontalGesturalScroller.prototype.ResetContent=function(){if(this.GesturalScrollerState==Framework.Controls.GesturalScrollerState.ANIMATING){this.ScrollAnimation.Stop();}var scrollAmount=this.OffsetStart+this.ScrollingElement.offsetLeft;this.ScrollContent(scrollAmount);};Framework.Controls.HorizontalGesturalScroller.prototype.CheckBoundaries=function(coordinates){var isAtBoundary=false;if(coordinates.PositionX>0){isAtBoundary=(!this.CheckReverseBoundary(this.ScrollingElement.offsetLeft));if(this.OnScrollerCanScrollNext!=null){this.OnScrollerCanScrollNext();}}else{isAtBoundary=(!this.CheckForwardBoundary(this.ScrollingElement.offsetLeft,this.ScrollingElement.clientWidth,this.MaskElement.clientWidth));if(this.OnScrollerCanScrollPrevious!=null){this.OnScrollerCanScrollPrevious();}}if(isAtBoundary){var deltaCoordinates=new Framework.Controls.Coordinate();deltaCoordinates.PositionX=(coordinates.PositionX>0)?-coordinates.PositionX:-(this.ScrollingElement.offsetLeft+(this.ScrollingElement.clientWidth-this.MaskElement.clientWidth));deltaCoordinates.PositionY=0;this.Move(deltaCoordinates);}return isAtBoundary;};Framework.Controls.HorizontalGesturalScroller.prototype.TimerTickHandler=function(){this.AccelerationCheckPosOverTime1=this.AccelerationCheckPosOverTime2;this.AccelerationCheckPosOverTime2=this.ScrollingElement.offsetLeft;};Framework.Controls.HorizontalGesturalScroller.prototype.DragHandler=function(coordinates){this.CheckBoundaries(coordinates);this.AccelerationCheckTime1=this.AccelerationCheckTime2;this.AccelerationCheckTime2=new Date().getMilliseconds();this.AccelerationCheckPos1=this.AccelerationCheckPos2;this.AccelerationCheckPos2=this.ScrollingElement.offsetLeft;};Framework.Controls.HorizontalGesturalScroller.prototype.AnimationTickHandler=function(){var coordinates=new Framework.Controls.Coordinate(this.ScrollingElement.offsetLeft-this.AnimationBoundaryCheckPos,0);var isAtBoundary=this.CheckBoundaries(coordinates);if(isAtBoundary){this.ScrollAnimation.Stop();}this.AnimationBoundaryCheckPos=this.ScrollingElement.offsetLeft;};Framework.Controls.VerticalGesturalScroller=function(scrollingElement,maskElement){this.InitGesturalScollerBase(scrollingElement,maskElement,scrollingElement.offsetTop,Framework.Controls.DraggableObjectDirection.VERTICAL,new Framework.Animation.VerticalMoveByAnimation(this.ScrollingElement,-this.ScrollIncrementBase,this.ScrollDurationBase,this.ScrollInterval,this.ScrollAcceleration));};Framework.Controls.VerticalGesturalScroller.prototype=new Framework.Controls.GesturalScrollerBase();Framework.Controls.VerticalGesturalScroller.prototype.ScrollContent=function(distance){this.ScrollAnimation.m_Element=this.ScrollingElement;this.ScrollAnimation.m_Duration=this.ScrollDurationBase;this.ScrollAnimation.m_Interval=this.ScrollInterval;this.ScrollAnimation.m_AccelerationType=this.ScrollAcceleration;this.ScrollAnimation.m_ChangeInPosY=distance;this.ScrollAnimation.Start();};Framework.Controls.VerticalGesturalScroller.prototype.ResetContent=function(){if(this.GesturalScrollerState==Framework.Controls.GesturalScrollerState.ANIMATING){this.ScrollAnimation.Stop();}this.ScrollContent(this.OffsetStart-this.ScrollingElement.offsetTop);};Framework.Controls.VerticalGesturalScroller.prototype.CheckBoundaries=function(coordinates){var isAtBoundary=false;if(coordinates.PositionY>0){isAtBoundary=(!this.CheckReverseBoundary(this.ScrollingElement.offsetTop));if(this.OnScrollerCanScrollNext!=null){this.OnScrollerCanScrollNext();}}else{isAtBoundary=(!this.CheckForwardBoundary(this.ScrollingElement.offsetTop,this.ScrollingElement.clientHeight,this.MaskElement.clientHeight));if(this.OnScrollerCanScrollPrevious!=null){this.OnScrollerCanScrollPrevious();}}if(isAtBoundary){var deltaCoordinates=new Framework.Controls.Coordinate();deltaCoordinates.PositionY=(coordinates.PositionY>0)?-coordinates.PositionY:-(this.ScrollingElement.offsetTop+(this.ScrollingElement.clientHeight-this.MaskElement.clientHeight));deltaCoordinates.PositionX=0;this.Move(deltaCoordinates);}return isAtBoundary;};Framework.Controls.VerticalGesturalScroller.prototype.TimerTickHandler=function(){this.AccelerationCheckPosOverTime1=this.AccelerationCheckPosOverTime2;this.AccelerationCheckPosOverTime2=this.ScrollingElement.offsetTop;};Framework.Controls.VerticalGesturalScroller.prototype.DragHandler=function(coordinates){this.CheckBoundaries(coordinates);this.AccelerationCheckTime1=this.AccelerationCheckTime2;this.AccelerationCheckTime2=new Date().getMilliseconds();this.AccelerationCheckPos1=this.AccelerationCheckPos2;this.AccelerationCheckPos2=this.ScrollingElement.offsetTop;};Framework.Controls.VerticalGesturalScroller.prototype.AnimationTickHandler=function(){var coordinates=new Framework.Controls.Coordinate(0,(this.ScrollingElement.offsetTop-this.AnimationBoundaryCheckPos));var isAtBoundary=this.CheckBoundaries(coordinates);if(isAtBoundary){this.ScrollAnimation.Stop();}this.AnimationBoundaryCheckPos=this.ScrollingElement.offsetTop;};var Framework=Framework||{};Framework.Controls=Framework.Controls||{};Framework.Controls.ResizingBackground=function(backgroundElement,aspectRatio){this.BackgroundElement=backgroundElement;this.AspectRatio=aspectRatio;this.MinimumWidth=null;this.MinimumHeight=null;this.OnResize=null;Framework.AddHandler(window,Framework.Events.WindowEvents.LOAD,Framework.CreateDelegate(this,this.PageLoadHandler));Framework.AddHandler(window,Framework.Events.WindowEvents.RESIZE,Framework.CreateDelegate(this,this.PageResizeHandler));};Framework.Controls.ResizingBackground.prototype.ResizeBackground=function(){var pageDimensions=this.GetPageDimensions();if(this.IsMinimumSize(pageDimensions)){return;}var adjustedDimensions=this.AdjustToApsectRatio(pageDimensions);this.BackgroundElement.width=adjustedDimensions.Width;this.BackgroundElement.height=adjustedDimensions.Height;if(this.OnResize!=null&&this.OnResize!=undefined){this.OnResize();}};Framework.Controls.ResizingBackground.prototype.GetPageDimensions=function(){var pageDimensions=new Framework.Drawing.Dimension();if(typeof(window.innerWidth)=="number"){pageDimensions.Width=window.innerWidth;pageDimensions.Height=window.innerHeight;}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){pageDimensions.Width=document.documentElement.clientWidth;pageDimensions.Height=document.documentElement.clientHeight;}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){pageDimensions.Width=document.body.clientWidth;pageDimensions.Height=document.body.clientHeight;}else{if(screen.width){pageDimensions.Width=screen.width;pageDimensions.Height=screen.height;}}}}return pageDimensions;};Framework.Controls.ResizingBackground.prototype.AdjustToApsectRatio=function(pageDimensions){var newPageDimensions=new Framework.Drawing.Dimension();if((pageDimensions.Width/pageDimensions.Height)>=(this.AspectRatio.Width/this.AspectRatio.Height)){newPageDimensions.Width=pageDimensions.Width;newPageDimensions.Height=(pageDimensions.Width/this.AspectRatio.Width)*this.AspectRatio.Height;}else{newPageDimensions.Width=(pageDimensions.Height/this.AspectRatio.Height)*this.AspectRatio.Width;newPageDimensions.Height=pageDimensions.Height;}return newPageDimensions;};Framework.Controls.ResizingBackground.prototype.IsMinimumSize=function(pageDimensions){if((pageDimensions.Width/pageDimensions.Height)>=(this.AspectRatio.Width/this.AspectRatio.Height)){if(pageDimensions.Width<this.MinimumWidth){return true;}else{return false;}}else{if(pageDimensions.Height<this.MinimumHeight){return true;}else{return false;}}};Framework.Controls.ResizingBackground.prototype.PageLoadHandler=function(){this.ResizeBackground();};Framework.Controls.ResizingBackground.prototype.PageResizeHandler=function(){this.ResizeBackground();};var Framework=Framework||{};Framework.Controls=Framework.Controls||{};Framework.IsIE8=function(){return/MSIE (8)/.test(navigator.userAgent)?true:false;};Framework.Controls.ScrollBarButtonDirection={VERTICAL:0,HORIZONTAL:1};Framework.Controls.ScrollBar=function(maskDiv,contentDiv,scrollbarBase,scrollbarSlider){this.MaskDiv=maskDiv;this.ContentDiv=contentDiv;this.Slider=scrollbarSlider;this.SliderBase=scrollbarBase;this.OnScrollStart=null;this.OnScrollEnd=null;this.OnScrollerCanScrollPrevious=null;this.OnScrollerCannotScrollPrevious=null;this.OnScrollerCanScrollNext=null;this.OnScrollerCannotScrollNext=null;};Framework.Controls.ScrollBar.prototype.AddScrollControl=function(control){if(control.Direction==Framework.Controls.ScrollBarButtonDirection.HORIZONTAL){control.OnScroll=Framework.CreateDelegate(this,this.ScrollContentHorizontally);}else{control.OnScroll=Framework.CreateDelegate(this,this.ScrollContentVertically);}control.OnScrollEnd=Framework.CreateDelegate(this,this.ScrollComplete);};Framework.Controls.ScrollBar.prototype.Reset=function(control){this.Slider.style.top="0px";this.ContentDiv.style.top="0px";if(this.OnScrollerCannotScrollPrevious!=null){this.OnScrollerCannotScrollPrevious();}if(this.OnScrollerCanScrollNext!=null){this.OnScrollerCanScrollNext();}};Framework.Controls.ScrollBar.prototype.MoveSlider=function(increment){var y=Framework.IsIE8()?(this.Slider.offsetTop-1+increment):(this.Slider.offsetTop+increment);this.Slider.style.top=y+"px";};Framework.Controls.ScrollBar.prototype.ScrollContentVertically=function(increment){if(this.OnScrollStart!=null){this.OnScrollStart();}var y=this.ContentDiv.offsetTop-increment;var yMin=0;var yMax=(this.MaskDiv.clientHeight-this.ContentDiv.clientHeight);if(y>=yMin){y=yMin;if(this.OnScrollerCannotScrollPrevious!=null){this.OnScrollerCannotScrollPrevious();}}else{if(this.OnScrollerCanScrollPrevious!=null){this.OnScrollerCanScrollPrevious();}}if(y<=yMax){y=yMax;if(this.OnScrollerCannotScrollNext!=null){this.OnScrollerCannotScrollNext();}}else{if(this.OnScrollerCanScrollNext!=null){this.OnScrollerCanScrollNext();}}this.ContentDiv.style.top=y+"px";var maxScroll=this.SliderBase.clientHeight-this.Slider.clientHeight;var percentScroll=this.ContentDiv.offsetTop/yMax;this.Slider.style.top=percentScroll*maxScroll+"px";};Framework.Controls.ScrollBar.prototype.ScrollContentHorizontally=function(increment){var x=Framework.IsIE8()?(this.Slider.offsetLeft+increment):(this.Slider.offsetLeft+increment);var xMin=0;var xMax=this.SliderBase.clientWidth-this.Slider.clientWidth;if(x<=xMin){x=xMin;}if(x>=xMax){x=xMax;}this.Slider.style.left=x+"px";var maxScroll=this.MaskDiv.clientWidth-this.ContentDiv.clientWidth;var percentScroll=this.Slider.offsetLeft/xMax;this.ContentDiv.style.left=percentScroll*maxScroll+"px";};Framework.Controls.ScrollBar.prototype.ScrollComplete=function(increment){if(this.OnScrollEnd!=null){this.OnScrollEnd();}};Framework.Controls.ScrollBarButton=function(buttonElement,increment,direction){this.Element=buttonElement;this.Increment=increment;this.Direction=(direction!=null&&direction!=undefined)?direction:Framework.Controls.ScrollBarButtonDirection.VERTICAL;this.Timer=null;this.Interval=10;this.OnScroll=null;this.OnScrollEnd=null;Framework.AddHandler(buttonElement,Framework.Events.MouseEvents.MOUSE_DOWN,Framework.CreateDelegate(this,this.MouseDownHandler));Framework.AddHandler(buttonElement,Framework.Events.MouseEvents.MOUSE_UP,Framework.CreateDelegate(this,this.MouseUpHandler));Framework.AddHandler(buttonElement,Framework.Events.TouchEvents.TOUCH_START,Framework.CreateDelegate(this,this.MouseDownHandler));Framework.AddHandler(buttonElement,Framework.Events.TouchEvents.TOUCH_END,Framework.CreateDelegate(this,this.MouseUpHandler));Framework.AddHandler(buttonElement,Framework.Events.MouseEvents.MOUSE_OUT,Framework.CreateDelegate(this,this.MouseUpHandler));};Framework.Controls.ScrollBarButton.prototype.MouseDownHandler=function(e){this.Timer=setInterval(Framework.CreateDelegate(this,this.IntervalCallBack),this.Interval);};Framework.Controls.ScrollBarButton.prototype.MouseUpHandler=function(e){clearInterval(this.Timer);if(this.OnScrollEnd!=null){this.OnScrollEnd();}};Framework.Controls.ScrollBarButton.prototype.IntervalCallBack=function(){if(this.OnScroll!=null){this.OnScroll(this.Increment);}};Framework.Controls.ScrollBarBase=function(baseElement,sliderElement,increment,direction){this.BaseElement=baseElement;this.SliderElement=sliderElement;this.Increment=increment;this.Direction=(direction!=null&&direction!=undefined)?direction:Framework.Controls.ScrollBarButtonDirection.VERTICAL;this.Timer=null;this.LastMousePosition=null;this.OnScroll=null;this.OnScrollEnd=null;Framework.AddHandler(baseElement,"mousedown",Framework.CreateDelegate(this,this.MouseDownHandler));Framework.AddHandler(baseElement,"mouseup",Framework.CreateDelegate(this,this.MouseUpHandler));};Framework.Controls.ScrollBarBase.prototype.MouseDownHandler=function(e){e=e||window.event;if(this.Direction==Framework.Controls.ScrollBarButtonDirection.VERTICAL){this.LastMousePosition=e.clientY-this.BaseElement.offsetTop;this.Timer=setInterval(Framework.CreateDelegate(this,this.VerticalIntervalCallBack),10);}else{this.LastMousePosition=e.clientX-this.BaseElement.offsetLeft;this.Timer=setInterval(Framework.CreateDelegate(this,this.HorizontalCallBack),10);}};Framework.Controls.ScrollBarBase.prototype.MouseUpHandler=function(e){e=e||window.event;clearInterval(this.Timer);};Framework.Controls.ScrollBarBase.prototype.VerticalIntervalCallBack=function(){if(isNaN(parseInt(this.SliderElement.style.top))){this.SliderElement.style.top="0px";}if(this.LastMousePosition<=parseInt(this.SliderElement.style.top)||this.LastMousePosition>=(parseInt(this.SliderElement.style.top)+this.SliderElement.clientHeight)){var increment=this.LastMousePosition<parseInt(this.SliderElement.style.top)?-(this.Increment):this.Increment;if(this.OnScroll!=null){this.OnScroll(increment);}}else{clearInterval(this.m_Timer);}};Framework.Controls.ScrollBarBase.prototype.HorizontalCallBack=function(){if(isNaN(parseInt(this.SliderElement.style.left))){this.SliderElement.style.left="0px";}if(this.LastMousePosition<=parseInt(this.SliderElement.style.left)||this.LastMousePosition>=(parseInt(this.SliderElement.style.left)+this.SliderElement.clientWidth)){var increment=this.LastMousePosition<parseInt(this.SliderElement.style.left)?-(this.Increment):this.Increment;if(this.OnScroll!=null){this.OnScroll(increment);}}else{clearInterval(this.m_Timer);}};Framework.Controls.ScrollBarSlider=function(sliderElement,baseElement,direction){this.SliderElement=sliderElement;this.BaseElement=baseElement;this.Direction=(direction!=null&&direction!=undefined)?direction:Framework.Controls.ScrollBarButtonDirection.VERTICAL;this.PageElement=(document.addEventListener)?window:document.body;this.LastMousePosition=null;this.OnScroll=null;this.OnScrollEnd=null;this.SliderMouseUpDelegate=Framework.CreateDelegate(this,this.MouseUpHandler);this.SliderMouseMoveDelegate=null;if(this.Direction==Framework.Controls.ScrollBarButtonDirection.VERTICAL){this.SliderMouseMoveDelegate=Framework.CreateDelegate(this,this.VerticalMouseMoveHandler);}else{this.SliderMouseMoveDelegate=Framework.CreateDelegate(this,this.HorizontalMouseMoveHandler);}Framework.AddHandler(sliderElement,"mousedown",Framework.CreateDelegate(this,this.MouseDownHandler));Framework.AddHandler(sliderElement,"mouseup",Framework.CreateDelegate(this,this.MouseUpHandler));};Framework.Controls.ScrollBarSlider.prototype.MouseDownHandler=function(e){e=e||window.event;e.cancelBubble=true;Framework.AddHandler(this.PageElement,"mousemove",this.SliderMouseMoveDelegate);Framework.AddHandler(this.PageElement,"mouseup",this.SliderMouseUpDelegate);if(this.Direction==Framework.Controls.ScrollBarButtonDirection.VERTICAL){if(isNaN(parseInt(this.SliderElement.style.top))){this.SliderElement.style.top="0px";}this.LastMousePosition=e.clientY;}else{if(isNaN(parseInt(this.SliderElement.style.left))){this.SliderElement.style.left="0px";}this.LastMousePosition=e.clientX;}return false;};Framework.Controls.ScrollBarSlider.prototype.MouseUpHandler=function(e){e=e||window.event;Framework.RemoveHandler(this.PageElement,"mousemove",this.SliderMouseMoveDelegate);Framework.RemoveHandler(this.PageElement,"mouseup",this.SliderMouseUpDelegate);this.ClearContentSelection(e);return false;};Framework.Controls.ScrollBarSlider.prototype.VerticalMouseMoveHandler=function(e){e=e||window.event;var increment=e.clientY-this.LastMousePosition;if(this.OnScroll!=null){this.OnScroll(increment);}this.LastMousePosition=e.clientY;this.ClearContentSelection(e);return false;};Framework.Controls.ScrollBarSlider.prototype.HorizontalMouseMoveHandler=function(e){e=e||window.event;var increment=e.clientX-this.LastMousePosition;if(this.OnScroll!=null){this.OnScroll(increment);}this.LastMousePosition=e.clientX;this.ClearContentSelection(e);return false;};Framework.Controls.ScrollBarSlider.prototype.ClearContentSelection=function(e){if(window.getSelection){window.getSelection().removeAllRanges();}else{document.selection.empty();}};Framework.Controls.GesturalScrollerState={STATIC:0,DRAGGING:1,ANIMATING:2};Framework.Controls.ScrollBarGestureControl=function(contentElement,direction){this.ContentElement=contentElement;this.Direction=direction;this.ScrollIncrement=300;this.ScrollDuration=500;this.ScrollInterval=Framework.IsiPhone()?20:10;this.ScrollAcceleration=Framework.Animation.AccelerationType.CUBIC_EASE_OUT;this.GesturalScrollerState=Framework.Controls.GesturalScrollerState.STATIC;this.AnimationTimer=null;this.AnimationStartTime=null;this.AnimationScrollDistance=null;this.AnimationStartPosY=null;this.AccelerationCheckTimer=null;this.AccelerationCheckPosOverTime1=0;this.AccelerationCheckPosOverTime2=0;this.AccelerationCheckPos1=0;this.AccelerationCheckPos2=0;this.AccelerationCheckTime1=0;this.AccelerationCheckTime2=0;this.SwipeStartPosY=null;this.SwipeEndPosY=null;this.OnScroll=null;this.OnScrollEnd=null;this.OnDragStart=Framework.CreateDelegate(this,this.DragStartHandler);this.OnDragEnd=Framework.CreateDelegate(this,this.DragEndHandler);this.OnDrag=Framework.CreateDelegate(this,this.DragHandler);this.TimerTickDelegate=Framework.CreateDelegate(this,this.TimerTickHandler);this.AnimationTickDelegate=Framework.CreateDelegate(this,this.AnimationTickHandler);this.InitDraggableObjectBase(contentElement,direction,Framework.Controls.DraggableObjectAnchor.TOP,Framework.Controls.DraggableObjectAnchor.LEFT,true);};Framework.Controls.ScrollBarGestureControl.prototype=new Framework.Controls.DraggableObjectBase();Framework.Controls.ScrollBarGestureControl.prototype.ScrollContent=function(distance){this.AnimationScrollDistance=distance;this.StartAnimation();};Framework.Controls.ScrollBarGestureControl.prototype.AdjustDistanceForDirection=function(distance){var directionalDistance=(this.AccelerationCheckPos2-this.AccelerationCheckPos1>0)?distance:-distance;return directionalDistance;};Framework.Controls.ScrollBarGestureControl.prototype.CancelScroll=function(){if(this.GesturalScrollerState==Framework.Controls.GesturalScrollerState.DRAGGING){this.OnDragEnd=null;this.MouseUpHandler();this.OnDragEnd=Framework.CreateDelegate(this,this.DragEndHandler);}if(this.GesturalScrollerState==Framework.Controls.GesturalScrollerState.ANIMATING){this.StopAnimation();}this.GesturalScrollerState=Framework.Controls.GesturalScrollerState.STATIC;};Framework.Controls.ScrollBarGestureControl.prototype.StartTimer=function(){if(this.AccelerationCheckTimer==null){this.AccelerationCheckTimer=setInterval(this.TimerTickDelegate,100);}};Framework.Controls.ScrollBarGestureControl.prototype.StopTimer=function(){if(this.AccelerationCheckTimer!=null){clearInterval(this.AccelerationCheckTimer);this.AccelerationCheckTimer=null;}};Framework.Controls.ScrollBarGestureControl.prototype.StartAnimation=function(){this.GesturalScrollerState=Framework.Controls.GesturalScrollerState.ANIMATING;this.AnimationStartTime=0;this.AnimationStartPosY=this.ContentElement.offsetTop;this.AnimationTimer=setInterval(this.AnimationTickDelegate,this.ScrollInterval);};Framework.Controls.ScrollBarGestureControl.prototype.StopAnimation=function(){clearInterval(this.AnimationTimer);this.AnimationTimer=null;this.GesturalScrollerState=Framework.Controls.GesturalScrollerState.STATIC;if(this.OnScrollEnd!=null){this.OnScrollEnd();}};Framework.Controls.ScrollBarGestureControl.prototype.DragStartHandler=function(e){if(this.GesturalScrollerState==Framework.Controls.GesturalScrollerState.ANIMATING){this.StopAnimation();}this.GesturalScrollerState=Framework.Controls.GesturalScrollerState.DRAGGING;this.StartTimer();return false;};Framework.Controls.ScrollBarGestureControl.prototype.DragEndHandler=function(e){this.GesturalScrollerState=Framework.Controls.GesturalScrollerState.STATIC;this.StopTimer();if(this.AccelerationCheckPosOverTime2-this.AccelerationCheckPosOverTime1==0){if(this.OnScrollEnd!=null){this.OnScrollEnd();}return;}var distanceMultiplier=(Framework.IsSafari())?100:50;var distance=Math.pow((1+(1/(this.AccelerationCheckTime2-this.AccelerationCheckTime1))*distanceMultiplier),2);if(Framework.IsiPhone()){this.ScrollDuration=300;}if(this.AccelerationCheckTime2>0){this.AccelerationCheckTime1=0;this.AccelerationCheckTime2=0;var directionalDistance=this.AdjustDistanceForDirection(distance);this.ScrollContent(directionalDistance);}return false;};Framework.Controls.ScrollBarGestureControl.prototype.DragHandler=function(coordinates){this.AccelerationCheckTime1=this.AccelerationCheckTime2;this.AccelerationCheckTime2=new Date().getMilliseconds();this.AccelerationCheckPos1=this.AccelerationCheckPos2;this.AccelerationCheckPos2=this.ContentElement.offsetTop;var increment=0;if(this.Direction==Framework.Controls.ScrollBarButtonDirection.HORIZONTAL){increment=-coordinates.PositionX;}else{increment=-coordinates.PositionY;}this.ClearContentSelection();if(this.OnScroll!=null){this.OnScroll(increment);}return false;};Framework.Controls.ScrollBarGestureControl.prototype.TimerTickHandler=function(){this.AccelerationCheckPosOverTime1=this.AccelerationCheckPosOverTime2;this.AccelerationCheckPosOverTime2=this.ContentElement.offsetTop;};Framework.Controls.ScrollBarGestureControl.prototype.AnimationTickHandler=function(){var elapsedTime=(this.AnimationStartTime+=this.ScrollInterval);var duration=this.ScrollDuration;var percentChange=eval(this.ScrollAcceleration);if(elapsedTime>this.ScrollDuration||percentChange>1){this.StopAnimation();}else{var changeInPos=(percentChange*this.AnimationScrollDistance);var newPos=this.AnimationStartPosY+changeInPos;var delta=-(newPos-this.ContentElement.offsetTop);if(this.OnScroll!=null){this.OnScroll(delta);}}};Framework.Controls.ScrollBarGestureControl.prototype.ClearContentSelection=function(){if(window.getSelection){window.getSelection().removeAllRanges();}else{document.selection.empty();}};Framework.Controls.ScrollBarWheel=function(contentElement){this.ContentElement=contentElement;this.WheelMoveDelegate=Framework.CreateDelegate(this,this.WheelMoveHandler);this.Direction=Framework.Controls.ScrollBarButtonDirection.VERTICAL;this.DelayTimer=null;this.OnScroll=null;this.OnScrollEnd=null;Framework.AddHandler(this.ContentElement,"mouseover",Framework.CreateDelegate(this,this.MouseOverHandler));Framework.AddHandler(this.ContentElement,"mouseout",Framework.CreateDelegate(this,this.MouseOutHandler));};Framework.Controls.ScrollBarWheel.prototype.StopDelayTimer=function(){clearTimeout(this.DelayTimer);this.DelayTimer=null;};Framework.Controls.ScrollBarWheel.prototype.StartDelayTimer=function(){this.DelayTimer=setTimeout(Framework.CreateDelegate(this,this.DelayTimerTickHandler),500);};Framework.Controls.ScrollBarWheel.prototype.DelayTimerTickHandler=function(e){if(this.OnScrollEnd!=null){this.OnScrollEnd();}};Framework.Controls.ScrollBarWheel.prototype.MouseOverHandler=function(e){e=e||window.event;Framework.AddWheelHandler(this.WheelMoveDelegate);};Framework.Controls.ScrollBarWheel.prototype.MouseOutHandler=function(e){e=e||window.event;this.StopDelayTimer();if(this.OnScrollEnd!=null){this.OnScrollEnd();}Framework.RemoveWheelHandler(this.WheelMoveDelegate);};Framework.Controls.ScrollBarWheel.prototype.WheelMoveHandler=function(e){e=e||window.event;if(e.stopPropagation){e.stopPropagation();}else{e.cancelBubble=true;}this.StopDelayTimer();var delta=0;if(e.wheelDelta){delta=-(e.wheelDelta/120);if(window.opera){delta=-delta;}}else{if(e.detail){delta=e.detail/3;}}if(this.OnScroll!=null&&delta){this.OnScroll(delta*36);}this.StartDelayTimer();if(e.preventDefault){e.preventDefault();}e.returnValue=false;return false;};var Framework=Framework||{};Framework.Controls=Framework.Controls||{};Framework.Controls.Clock=function(timeElement,ampmElement){this.TimeElement=timeElement;this.AM_PM_Element=ampmElement;this.GMT_Offset=null;this.RepeatTimer=null;this.RepeatTimerDelay=1000;this.OnTick=null;};Framework.Controls.Clock.prototype.Start=function(){this.RepeatTimer=setInterval(Framework.CreateDelegate(this,this.RepeatTimerTickHandler),this.RepeatTimerDelay);};Framework.Controls.Clock.prototype.Stop=function(){clearInterval(this.RepeatTimer);this.RepeatTimer=null;};Framework.Controls.Clock.prototype.GetGMTAdjustedHours=function(date){var currentHour=date.getHours();if(this.GMT_Offset!=null){var localGMTOffset=date.getTimezoneOffset()/60;currentHour=currentHour+(localGMTOffset-this.GMT_Offset);}return currentHour;};Framework.Controls.Clock.prototype.NormalizeHour=function(hour){var currentHour=hour;if(currentHour==0){currentHour=12;}if(currentHour>12){currentHour=currentHour-12;}return currentHour;};Framework.Controls.Clock.prototype.GetMinutes=function(date){var currentMinutes=date.getMinutes();currentMinutes=currentMinutes+"";if(currentMinutes.length==1){currentMinutes="0"+currentMinutes;}return currentMinutes;};Framework.Controls.Clock.prototype.GetAMPM=function(hour){var am_pm="";if(hour<12){am_pm="AM";}else{am_pm="PM";}return am_pm;};Framework.Controls.Clock.prototype.UpdateClock=function(){var date=new Date();var currentHour=this.GetGMTAdjustedHours(date);var am_pm=this.GetAMPM(currentHour);currentHour=this.NormalizeHour(currentHour);var currentMinutes=this.GetMinutes(date);this.TimeElement.innerHTML=currentHour+":"+currentMinutes;this.AM_PM_Element.innerHTML=am_pm;};Framework.Controls.Clock.prototype.RepeatTimerTickHandler=function(){this.UpdateClock();};var Riney=Riney||{};Riney.PanelState={OPEN:0,CLOSED:1};Riney.PanelOrientation={LANDSCAPE:0,PORTRAIT:1};Riney.PanelPlacement={HOME:"home",SHOW:"show",HIDE:"hide",HIDE2:"hide2"};Riney.ContentPanelProperties=function(){this.PanelElement=null;this.NextArrow=null;this.PanelColor=null;this.PanelHoverColor=null;this.ContentContainer=null;this.Content=null;this.ContentMask=null;this.UpArrow=null;this.DownArrow=null;this.ScrollbarBase=null;this.ScrollbarScrubber=null;this.ScrollbarScrubberScrollColor=null;this.ScrollbarScrubberStaticColor=null;this.PortraitContentShowPosition=null;this.PortraitContentHidePosition=null;this.HideTransitionCoordinates=null;this.Hide2TransitionCoordinates=null;this.ShowTransitionCoordinates=null;this.HomeTransitionCoordinates=null;this.HideTransitionPortraitCoordinates=null;this.Hide2TransitionPortraitCoordinates=null;this.ShowTransitionPortraitCoordinates=null;this.HomeTransitionPortraitCoordinates=null;this.TransitionDuration=null;this.MinWidth=null;this.MinHeight=null;this.MaxWidth=null;this.MaxHeight=null;this.PanelExpandTriggers=new Array();this.PanelCollapseTriggers=new Array();};Riney.ContentPanel=function(panelProperties){this.PanelProperties=panelProperties;this.ContentScrollBar=null;this.CollapsiblePanel=null;this.LandscapeAnimations=new Array();this.PortraitAnimations=new Array();this.PortraitContentShowAnimation=null;this.PortraitContentHideAnimation=null;this.PanelState=Riney.PanelState.CLOSED;this.PanelPlacement=Riney.PanelPlacement.HOME;this.PanelOrientation=this.GetOrientation();this.OnClick=null;this.OnTransitionStart=null;this.OnTransitionComplete=null;this.PanelMouseOverDelegate=Framework.CreateDelegate(this,this.PanelMouseOverHandler);this.PanelMouseOutDelegate=Framework.CreateDelegate(this,this.PanelMouseOutHandler);this.InitTransitions();this.InitCollapsiblePanel();this.InitScrollbar();Framework.AddHandler(this.PanelProperties.PanelElement,Framework.Events.MouseEvents.MOUSE_OVER,this.PanelMouseOverDelegate);Framework.AddHandler(this.PanelProperties.PanelElement,Framework.Events.MouseEvents.MOUSE_OUT,this.PanelMouseOutDelegate);Framework.AddHandler(this.PanelProperties.PanelElement,Framework.Events.MouseEvents.CLICK,Framework.CreateDelegate(this,this.ClickHandler));Framework.AddHandler(window,Framework.Events.WindowEvents.ORIENTATION_CHANGE,Framework.CreateDelegate(this,this.OrientationChangeHandler));};Riney.ContentPanel.prototype.InitTransitions=function(){this.LandscapeAnimations.hide=new Framework.Animation.MoveAnimation(this.PanelProperties.PanelElement,this.PanelProperties.HideTransitionCoordinates.PositionX,this.PanelProperties.HideTransitionCoordinates.PositionY,this.PanelProperties.TransitionDuration,10,Framework.Animation.AccelerationType.QUARTIC_EASE_OUT);this.LandscapeAnimations.hide.OnAnimationStart=Framework.CreateDelegate(this,this.TransitionStartHandler);this.LandscapeAnimations.hide.OnAnimationComplete=Framework.CreateDelegate(this,this.TransitionCompleteHandler);this.LandscapeAnimations.hide2=new Framework.Animation.MoveAnimation(this.PanelProperties.PanelElement,this.PanelProperties.Hide2TransitionCoordinates.PositionX,this.PanelProperties.Hide2TransitionCoordinates.PositionY,this.PanelProperties.TransitionDuration,10,Framework.Animation.AccelerationType.QUARTIC_EASE_OUT);this.LandscapeAnimations.hide2.OnAnimationStart=Framework.CreateDelegate(this,this.TransitionStartHandler);this.LandscapeAnimations.hide2.OnAnimationComplete=Framework.CreateDelegate(this,this.TransitionCompleteHandler);this.LandscapeAnimations.show=new Framework.Animation.MoveAnimation(this.PanelProperties.PanelElement,this.PanelProperties.ShowTransitionCoordinates.PositionX,this.PanelProperties.ShowTransitionCoordinates.PositionY,this.PanelProperties.TransitionDuration,10,Framework.Animation.AccelerationType.QUARTIC_EASE_OUT);this.LandscapeAnimations.show.OnAnimationStart=Framework.CreateDelegate(this,this.TransitionStartHandler);this.LandscapeAnimations.show.OnAnimationComplete=Framework.CreateDelegate(this,this.TransitionCompleteHandler);this.LandscapeAnimations.home=new Framework.Animation.MoveAnimation(this.PanelProperties.PanelElement,this.PanelProperties.HomeTransitionCoordinates.PositionX,this.PanelProperties.HomeTransitionCoordinates.PositionY,this.PanelProperties.TransitionDuration,10,Framework.Animation.AccelerationType.QUARTIC_EASE_OUT);this.LandscapeAnimations.home.OnAnimationStart=Framework.CreateDelegate(this,this.TransitionStartHandler);this.LandscapeAnimations.home.OnAnimationComplete=Framework.CreateDelegate(this,this.TransitionCompleteHandler);this.PortraitAnimations.hide=new Framework.Animation.MoveAnimation(this.PanelProperties.PanelElement,this.PanelProperties.HideTransitionPortraitCoordinates.PositionX,this.PanelProperties.HideTransitionPortraitCoordinates.PositionY,this.PanelProperties.TransitionDuration,10,Framework.Animation.AccelerationType.QUARTIC_EASE_OUT);this.PortraitAnimations.hide.OnAnimationStart=Framework.CreateDelegate(this,this.TransitionStartHandler);this.PortraitAnimations.hide.OnAnimationComplete=Framework.CreateDelegate(this,this.TransitionCompleteHandler);this.PortraitAnimations.hide2=new Framework.Animation.MoveAnimation(this.PanelProperties.PanelElement,this.PanelProperties.Hide2TransitionPortraitCoordinates.PositionX,this.PanelProperties.Hide2TransitionPortraitCoordinates.PositionY,this.PanelProperties.TransitionDuration,10,Framework.Animation.AccelerationType.QUARTIC_EASE_OUT);this.PortraitAnimations.hide2.OnAnimationStart=Framework.CreateDelegate(this,this.TransitionStartHandler);this.PortraitAnimations.hide2.OnAnimationComplete=Framework.CreateDelegate(this,this.TransitionCompleteHandler);this.PortraitAnimations.show=new Framework.Animation.MoveAnimation(this.PanelProperties.PanelElement,this.PanelProperties.ShowTransitionPortraitCoordinates.PositionX,this.PanelProperties.ShowTransitionPortraitCoordinates.PositionY,this.PanelProperties.TransitionDuration,10,Framework.Animation.AccelerationType.QUARTIC_EASE_OUT);this.PortraitAnimations.show.OnAnimationStart=Framework.CreateDelegate(this,this.TransitionStartHandler);this.PortraitAnimations.show.OnAnimationComplete=Framework.CreateDelegate(this,this.TransitionCompleteHandler);this.PortraitAnimations.home=new Framework.Animation.MoveAnimation(this.PanelProperties.PanelElement,this.PanelProperties.HomeTransitionPortraitCoordinates.PositionX,this.PanelProperties.HomeTransitionPortraitCoordinates.PositionY,this.PanelProperties.TransitionDuration,10,Framework.Animation.AccelerationType.QUARTIC_EASE_OUT);this.PortraitAnimations.home.OnAnimationStart=Framework.CreateDelegate(this,this.TransitionStartHandler);this.PortraitAnimations.home.OnAnimationComplete=Framework.CreateDelegate(this,this.TransitionCompleteHandler);this.PortraitContentShowAnimation=new Framework.Animation.HorizontalMoveAnimation(this.PanelProperties.ContentContainer,this.PanelProperties.PortraitContentShowPosition,this.PanelProperties.TransitionDuration,10,Framework.Animation.AccelerationType.QUARTIC_EASE_OUT);this.PortraitContentHideAnimation=new Framework.Animation.HorizontalMoveAnimation(this.PanelProperties.ContentContainer,this.PanelProperties.PortraitContentHidePosition,this.PanelProperties.TransitionDuration,10,Framework.Animation.AccelerationType.QUARTIC_EASE_OUT);};Riney.ContentPanel.prototype.InitCollapsiblePanel=function(){this.CollapsiblePanel=new Framework.Controls.CollapsiblePanel(this.PanelProperties.PanelElement,new Framework.Controls.Trigger(this.PanelProperties.PanelElement,Framework.Events.MouseEvents.CLICK,Framework.Controls.CollapsiblePanelTriggerType.EXPAND),this.PanelProperties.MinWidth,this.PanelProperties.MinHeight,this.PanelProperties.MaxWidth,this.PanelProperties.MaxHeight,250,10,Framework.Animation.AccelerationType.QUADRATIC_EASE_OUT,Framework.Controls.CollapsiblePanelStartState.COLLAPSED,Framework.Controls.CollapsiblePanelExpansionAllowedSetting.NO);for(var index=0;index<this.PanelProperties.PanelCollapseTriggers.length;index++){this.CollapsiblePanel.AddTrigger(new Framework.Controls.Trigger(this.PanelProperties.PanelCollapseTriggers[index],Framework.Events.MouseEvents.CLICK,Framework.Controls.CollapsiblePanelTriggerType.COLLAPSE));}for(var index=0;index<this.PanelProperties.PanelExpandTriggers.length;index++){this.CollapsiblePanel.AddTrigger(new Framework.Controls.Trigger(this.PanelProperties.PanelExpandTriggers[index],Framework.Events.MouseEvents.CLICK,Framework.Controls.CollapsiblePanelTriggerType.EXPAND));}if(this.PanelOrientation==Riney.PanelOrientation.PORTRAIT){this.CollapsiblePanel.m_Enabled=Framework.Controls.CollapsiblePanelEnabled.NO;}};Riney.ContentPanel.prototype.InitScrollbar=function(){this.ContentScrollBar=new Framework.Controls.ScrollBar(this.PanelProperties.ContentMask,this.PanelProperties.Content,this.PanelProperties.ScrollbarBase,this.PanelProperties.ScrollbarScrubber);this.ContentScrollBar.AddScrollControl(new Framework.Controls.ScrollBarButton(this.PanelProperties.UpArrow,-3,Framework.Controls.ScrollBarButtonDirection.VERTICAL));this.ContentScrollBar.AddScrollControl(new Framework.Controls.ScrollBarButton(this.PanelProperties.DownArrow,3,Framework.Controls.ScrollBarButtonDirection.VERTICAL));this.ContentScrollBar.AddScrollControl(new Framework.Controls.ScrollBarGestureControl(this.PanelProperties.Content,Framework.Controls.ScrollBarButtonDirection.VERTICAL));this.ContentScrollBar.AddScrollControl(new Framework.Controls.ScrollBarWheel(this.PanelProperties.Content));this.ContentScrollBar.OnScrollStart=Framework.CreateDelegate(this,this.ScrollStartHandler);this.ContentScrollBar.OnScrollEnd=Framework.CreateDelegate(this,this.ScrollEndHandler);this.ContentScrollBar.OnScrollerCanScrollPrevious=Framework.CreateDelegate(this,this.OnScrollerCanScrollPreviousHandler);this.ContentScrollBar.OnScrollerCannotScrollPrevious=Framework.CreateDelegate(this,this.OnScrollerCannotScrollPreviousHandler);this.ContentScrollBar.OnScrollerCanScrollNext=Framework.CreateDelegate(this,this.OnScrollerCanScrollNextHandler);this.ContentScrollBar.OnScrollerCannotScrollNext=Framework.CreateDelegate(this,this.OnScrollerCannotScrollNextHandler);this.ContentScrollBar.OnScrollerCannotScrollPrevious();};Riney.ContentPanel.prototype.ShowPanel=function(color){if(this.PanelState==Riney.PanelState.OPEN){return;}this.PanelState=Riney.PanelState.OPEN;this.PanelPlacement=Riney.PanelPlacement.SHOW;this.PanelProperties.NextArrow.style.display=Framework.CSS.Display.NONE;if(this.PanelOrientation==Riney.PanelOrientation.LANDSCAPE){this.LandscapeAnimations[Riney.PanelPlacement.SHOW].Start();}else{this.PortraitAnimations[Riney.PanelPlacement.SHOW].Start();this.PortraitContentShowAnimation.Start();}Framework.RemoveHandler(this.PanelProperties.PanelElement,Framework.Events.MouseEvents.MOUSE_OVER,this.PanelMouseOverDelegate);Framework.RemoveHandler(this.PanelProperties.PanelElement,Framework.Events.MouseEvents.MOUSE_OUT,this.PanelMouseOutDelegate);};Riney.ContentPanel.prototype.HidePanel=function(color){this.ContentScrollBar.Reset();this.PanelProperties.NextArrow.style.display=Framework.CSS.Display.BLOCK;if(this.PanelOrientation==Riney.PanelOrientation.LANDSCAPE){this.LandscapeAnimations[Riney.PanelPlacement.HIDE].Start();}else{this.PortraitAnimations[Riney.PanelPlacement.HIDE].Start();this.PortraitContentHideAnimation.Start();}if(this.PanelState==Riney.PanelState.OPEN){Framework.AddHandler(this.PanelProperties.PanelElement,Framework.Events.MouseEvents.MOUSE_OVER,this.PanelMouseOverDelegate);Framework.AddHandler(this.PanelProperties.PanelElement,Framework.Events.MouseEvents.MOUSE_OUT,this.PanelMouseOutDelegate);}this.PanelState=Riney.PanelState.CLOSED;this.PanelPlacement=Riney.PanelPlacement.HIDE;};Riney.ContentPanel.prototype.HidePanel2=function(color){this.ContentScrollBar.Reset();this.PanelProperties.NextArrow.style.display=Framework.CSS.Display.BLOCK;if(this.PanelOrientation==Riney.PanelOrientation.LANDSCAPE){this.LandscapeAnimations[Riney.PanelPlacement.HIDE2].Start();}else{this.PortraitAnimations[Riney.PanelPlacement.HIDE2].Start();this.PortraitContentHideAnimation.Start();}if(this.PanelState==Riney.PanelState.OPEN){Framework.AddHandler(this.PanelProperties.PanelElement,Framework.Events.MouseEvents.MOUSE_OVER,this.PanelMouseOverDelegate);Framework.AddHandler(this.PanelProperties.PanelElement,Framework.Events.MouseEvents.MOUSE_OUT,this.PanelMouseOutDelegate);}this.PanelState=Riney.PanelState.CLOSED;this.PanelPlacement=Riney.PanelPlacement.HIDE2;};Riney.ContentPanel.prototype.SendPanelHome=function(color){this.ContentScrollBar.Reset();this.PanelProperties.NextArrow.style.display=Framework.CSS.Display.BLOCK;if(this.PanelOrientation==Riney.PanelOrientation.LANDSCAPE){this.LandscapeAnimations[Riney.PanelPlacement.HOME].Start();}else{this.PortraitAnimations[Riney.PanelPlacement.HOME].Start();this.PortraitContentHideAnimation.Start();}if(this.PanelState==Riney.PanelState.OPEN){Framework.AddHandler(this.PanelProperties.PanelElement,Framework.Events.MouseEvents.MOUSE_OVER,this.PanelMouseOverDelegate);Framework.AddHandler(this.PanelProperties.PanelElement,Framework.Events.MouseEvents.MOUSE_OUT,this.PanelMouseOutDelegate);}this.PanelState=Riney.PanelState.CLOSED;this.PanelPlacement=Riney.PanelPlacement.HOME;};Riney.ContentPanel.prototype.SelectPanel=function(){this.SetPanelColor(this.PanelProperties.PanelElement,this.PanelProperties.PanelHoverColor);};Riney.ContentPanel.prototype.DeselectPanel=function(){this.SetPanelColor(this.PanelProperties.PanelElement,this.PanelProperties.PanelColor);};Riney.ContentPanel.prototype.SetPanelColor=function(element,color){element.style.backgroundColor=color;};Riney.ContentPanel.prototype.Resize=function(panelHeight){var contentMaskHeight=this.PanelOrientation==Riney.PanelOrientation.LANDSCAPE?(panelHeight-80):(panelHeight-115);var contentContainerHeight=this.PanelOrientation==Riney.PanelOrientation.LANDSCAPE?(panelHeight):(panelHeight-35);this.PanelProperties.PanelElement.style.height=panelHeight+"px";this.PanelProperties.ContentContainer.style.height=contentContainerHeight+"px";this.PanelProperties.ContentMask.style.height=contentMaskHeight+"px";this.PanelProperties.ScrollbarBase.style.height=contentMaskHeight+"px";this.CollapsiblePanel.m_ExpandAnimation.m_StartHeight=panelHeight;this.CollapsiblePanel.m_ExpandAnimation.m_EndHeight=panelHeight;this.CollapsiblePanel.m_CollapseAnimation.m_StartHeight=panelHeight;this.CollapsiblePanel.m_CollapseAnimation.m_EndHeight=panelHeight;this.AdjustScrollBarHeight();};Riney.ContentPanel.prototype.AdjustScrollBarHeight=function(){var newScrubberHeight=(this.PanelProperties.ContentMask.clientHeight/this.PanelProperties.Content.clientHeight)*this.PanelProperties.ContentMask.clientHeight;this.PanelProperties.ScrollbarScrubber.style.height=newScrubberHeight+"px";};Riney.ContentPanel.prototype.GetOrientation=function(){if(!Framework.IsiPad()&&!Framework.IsiPhone()){return Riney.PanelOrientation.LANDSCAPE;}if(orientation==0||orientation==180){return Riney.PanelOrientation.PORTRAIT;}else{return Riney.PanelOrientation.LANDSCAPE;}};Riney.ContentPanel.prototype.ClickHandler=function(){if(this.OnClick!=null&&this.OnClick!=undefined){this.OnClick();}var orientation=this.GetOrientation();if(orientation==Riney.PanelOrientation.PORTRAIT){}};Riney.ContentPanel.prototype.PanelMouseOverHandler=function(){this.SelectPanel();};Riney.ContentPanel.prototype.PanelMouseOutHandler=function(){this.DeselectPanel();};Riney.ContentPanel.prototype.OrientationChangeHandler=function(){this.PanelOrientation=this.GetOrientation();this.Resize();if(this.PanelOrientation==Riney.PanelOrientation.LANDSCAPE){this.CollapsiblePanel.m_Enabled=Framework.Controls.CollapsiblePanelEnabled.YES;if(this.PanelState==Riney.PanelState.OPEN){this.CollapsiblePanel.Expand();this.PortraitContentHideAnimation.Start();}this.LandscapeAnimations[this.PanelPlacement].Start();}else{this.CollapsiblePanel.m_Enabled=Framework.Controls.CollapsiblePanelEnabled.NO;if(this.PanelState==Riney.PanelState.OPEN){this.CollapsiblePanel.Collapse();this.PortraitContentShowAnimation.Start();}this.PortraitAnimations[this.PanelPlacement].Start();}};Riney.ContentPanel.prototype.TransitionStartHandler=function(){if(this.OnTransitionStart!=null&&this.OnTransitionStart!=undefined){this.OnTransitionStart();}};Riney.ContentPanel.prototype.TransitionCompleteHandler=function(){if(this.OnTransitionComplete!=null&&this.OnTransitionComplete!=undefined){this.OnTransitionComplete();}};Riney.ContentPanel.prototype.ScrollStartHandler=function(){this.SetPanelColor(this.PanelProperties.ScrollbarScrubber,this.PanelProperties.ScrollbarScrubberScrollColor);};Riney.ContentPanel.prototype.ScrollEndHandler=function(){this.SetPanelColor(this.PanelProperties.ScrollbarScrubber,this.PanelProperties.ScrollbarScrubberStaticColor);};Riney.ContentPanel.prototype.OnScrollerCanScrollPreviousHandler=function(){this.PanelProperties.UpArrow.style.display=Framework.CSS.Display.BLOCK;};Riney.ContentPanel.prototype.OnScrollerCannotScrollPreviousHandler=function(){this.PanelProperties.UpArrow.style.display=Framework.CSS.Display.NONE;};Riney.ContentPanel.prototype.OnScrollerCanScrollNextHandler=function(){this.PanelProperties.DownArrow.style.display=Framework.CSS.Display.BLOCK;};Riney.ContentPanel.prototype.OnScrollerCannotScrollNextHandler=function(){this.PanelProperties.DownArrow.style.display=Framework.CSS.Display.NONE;};Riney.ContactPanel=function(contactsDrawerElement,triggerElement,minWidth,minHeight,maxWidth,maxHeight){this.ContactsDrawerTrigger=triggerElement;this.CollapsiblePanel=new Framework.Controls.CollapsiblePanel(contactsDrawerElement,new Framework.Controls.Trigger(triggerElement,Framework.Events.MouseEvents.CLICK,Framework.Controls.CollapsiblePanelTriggerType.BOTH),minWidth,minHeight,maxWidth,maxHeight,200,10,Framework.Animation.AccelerationType.QUADRATIC_EASE_OUT,Framework.Controls.CollapsiblePanelStartState.COLLAPSED,Framework.Controls.CollapsiblePanelExpansionAllowedSetting.NO);this.CollapsiblePanel.OnExpandComplete=Framework.CreateDelegate(this,this.DrawerExpandCompleteHandler);this.CollapsiblePanel.OnCollapseComplete=Framework.CreateDelegate(this,this.DrawerCollapseCompleteHandler);};Riney.ContactPanel.prototype.DrawerExpandCompleteHandler=function(){this.ContactsDrawerTrigger.className="expanded";};Riney.ContactPanel.prototype.DrawerCollapseCompleteHandler=function(){this.ContactsDrawerTrigger.className="collapsed";};Riney.Page=function(){this.RineySite=document.getElementById("riney-site");this.ViewMask=document.getElementById("view-mask");this.ViewContainer=document.getElementById("view-container");this.ContactsDrawerElement=document.getElementById("contact-drawer");this.ContactsDrawerTrigger=document.getElementById("tab");this.ClockTimeElement=document.getElementById("time-info-data");this.ClockMeasureElement=document.getElementById("time-info-measure");this.RineyLogo=document.getElementById("riney-logo");this.Overlay=document.getElementById("overlay");this.ViewWidth=1024;this.ViewHeight=this.ViewContainer.clientHeight;this.PanelHeight=this.ViewHeight-45;this.PanelMinWidth=308;this.PanelWidth=632;this.ContentMaskHeight=369;this.ContactDrawerHeightExpanded=515;this.ContactDrawerHeightCollapsed=25;this.ContactDrawerWidth=420;this.OurStoryPanel=null;this.WhatWeBelievePanel=null;this.WhoWeArePanel=null;this.ContactsDrawer=null;this.ResizingBackground=null;this.Clock=null;this.InitPanels();this.InitContactsDrawer(document.getElementById("contact-drawer"),document.getElementById("tab"));this.InitResizingBackground();this.InitClock();Framework.AddHandler(this.RineyLogo,Framework.Events.MouseEvents.CLICK,Framework.CreateDelegate(this,this.RineyLogoClickHandler));Framework.AddHandler(window,Framework.Events.TouchEvents.TOUCH_MOVE,Framework.CreateDelegate(this,this.PreventDefault));Framework.AddHandler(window,Framework.Events.WindowEvents.ORIENTATION_CHANGE,Framework.CreateDelegate(this,this.OrientationChangeHandler));if(Framework.IsiPad()){this.ToggleOrientation();}this.ResizingBackground.ResizeBackground();};Riney.Page.prototype.InitPanels=function(){var OurStoryPanelProperties=new Riney.ContentPanelProperties();OurStoryPanelProperties.PanelElement=document.getElementById("our-story");OurStoryPanelProperties.ContentContainer=document.getElementById("our-story-content-container");OurStoryPanelProperties.Content=document.getElementById("our-story-content");OurStoryPanelProperties.ContentMask=document.getElementById("our-story-content-mask");OurStoryPanelProperties.NextArrow=document.getElementById("our-story-next-arrow");OurStoryPanelProperties.UpArrow=document.getElementById("our-story-up-arrow");OurStoryPanelProperties.DownArrow=document.getElementById("our-story-down-arrow");OurStoryPanelProperties.ScrollbarBase=document.getElementById("our-story-scrollbar-base");OurStoryPanelProperties.ScrollbarScrubber=document.getElementById("our-story-scrollbar-scrubber");OurStoryPanelProperties.ScrollbarScrubberScrollColor="#423A4D";OurStoryPanelProperties.ScrollbarScrubberStaticColor="transparent";OurStoryPanelProperties.PortraitContentShowPosition=10;OurStoryPanelProperties.PortraitContentHidePosition=334;OurStoryPanelProperties.HideTransitionCoordinates=new Framework.Controls.Coordinate(860,0);OurStoryPanelProperties.Hide2TransitionCoordinates=new Framework.Controls.Coordinate(881,69);OurStoryPanelProperties.ShowTransitionCoordinates=new Framework.Controls.Coordinate(187,0);OurStoryPanelProperties.HomeTransitionCoordinates=new Framework.Controls.Coordinate(187,0);OurStoryPanelProperties.HideTransitionPortraitCoordinates=new Framework.Controls.Coordinate(560,0);OurStoryPanelProperties.Hide2TransitionPortraitCoordinates=new Framework.Controls.Coordinate(581,69);OurStoryPanelProperties.ShowTransitionPortraitCoordinates=new Framework.Controls.Coordinate(187,0);OurStoryPanelProperties.HomeTransitionPortraitCoordinates=new Framework.Controls.Coordinate(187,0);OurStoryPanelProperties.TransitionDuration=Framework.IsiPad()?300:500;OurStoryPanelProperties.MinWidth=this.PanelMinWidth;OurStoryPanelProperties.MinHeight=this.PanelHeight;OurStoryPanelProperties.MaxWidth=this.PanelWidth;OurStoryPanelProperties.MaxHeight=this.PanelHeight;OurStoryPanelProperties.PanelColor="#584D67";OurStoryPanelProperties.PanelHoverColor="#4D346F";OurStoryPanelProperties.PanelCollapseTriggers.push(document.getElementById("what-we-believe"));OurStoryPanelProperties.PanelCollapseTriggers.push(document.getElementById("who-we-are"));OurStoryPanelProperties.PanelCollapseTriggers.push(this.RineyLogo);this.OurStoryPanel=new Riney.ContentPanel(OurStoryPanelProperties);this.OurStoryPanel.OnClick=Framework.CreateDelegate(this,this.OurStoryClickHandler);this.OurStoryPanel.OnTransitionStart=Framework.CreateDelegate(this,this.TransitionStartHandler);this.OurStoryPanel.OnTransitionComplete=Framework.CreateDelegate(this,this.TransitionCompleteHandler);var WhatWeBelievePanelProperties=new Riney.ContentPanelProperties();WhatWeBelievePanelProperties.PanelElement=document.getElementById("what-we-believe");WhatWeBelievePanelProperties.ContentContainer=document.getElementById("what-we-believe-content-container");WhatWeBelievePanelProperties.Content=document.getElementById("what-we-believe-content");WhatWeBelievePanelProperties.ContentMask=document.getElementById("what-we-believe-content-mask");WhatWeBelievePanelProperties.NextArrow=document.getElementById("what-we-believe-next-arrow");WhatWeBelievePanelProperties.UpArrow=document.getElementById("what-we-believe-up-arrow");WhatWeBelievePanelProperties.DownArrow=document.getElementById("what-we-believe-down-arrow");WhatWeBelievePanelProperties.ScrollbarBase=document.getElementById("what-we-believe-scrollbar-base");WhatWeBelievePanelProperties.ScrollbarScrubber=document.getElementById("what-we-believe-scrollbar-scrubber");WhatWeBelievePanelProperties.ScrollbarScrubberScrollColor="#688a8c";WhatWeBelievePanelProperties.ScrollbarScrubberStaticColor="transparent";WhatWeBelievePanelProperties.PortraitContentShowPosition=10;WhatWeBelievePanelProperties.PortraitContentHidePosition=334;WhatWeBelievePanelProperties.HideTransitionCoordinates=new Framework.Controls.Coordinate(860,0);WhatWeBelievePanelProperties.Hide2TransitionCoordinates=new Framework.Controls.Coordinate(881,69);WhatWeBelievePanelProperties.ShowTransitionCoordinates=new Framework.Controls.Coordinate(187,0);WhatWeBelievePanelProperties.HomeTransitionCoordinates=new Framework.Controls.Coordinate(505,0);WhatWeBelievePanelProperties.HideTransitionPortraitCoordinates=new Framework.Controls.Coordinate(560,0);WhatWeBelievePanelProperties.Hide2TransitionPortraitCoordinates=new Framework.Controls.Coordinate(581,69);WhatWeBelievePanelProperties.ShowTransitionPortraitCoordinates=new Framework.Controls.Coordinate(187,0);WhatWeBelievePanelProperties.HomeTransitionPortraitCoordinates=new Framework.Controls.Coordinate(505,0);WhatWeBelievePanelProperties.TransitionDuration=Framework.IsiPad()?300:500;WhatWeBelievePanelProperties.MinWidth=this.PanelMinWidth;WhatWeBelievePanelProperties.MinHeight=this.PanelHeight;WhatWeBelievePanelProperties.MaxWidth=this.PanelWidth;WhatWeBelievePanelProperties.MaxHeight=this.PanelHeight;WhatWeBelievePanelProperties.PanelColor="#83AEB0";WhatWeBelievePanelProperties.PanelHoverColor="#60C5CA";WhatWeBelievePanelProperties.PanelCollapseTriggers.push(document.getElementById("our-story"));WhatWeBelievePanelProperties.PanelCollapseTriggers.push(document.getElementById("who-we-are"));WhatWeBelievePanelProperties.PanelCollapseTriggers.push(this.RineyLogo);this.WhatWeBelievePanel=new Riney.ContentPanel(WhatWeBelievePanelProperties);this.WhatWeBelievePanel.OnClick=Framework.CreateDelegate(this,this.WhatWeBelieveClickHandler);this.WhatWeBelievePanel.OnTransitionStart=Framework.CreateDelegate(this,this.TransitionStartHandler);this.WhatWeBelievePanel.OnTransitionComplete=Framework.CreateDelegate(this,this.TransitionCompleteHandler);var WhoWeArePanelProperties=new Riney.ContentPanelProperties();WhoWeArePanelProperties.PanelElement=document.getElementById("who-we-are");WhoWeArePanelProperties.ContentContainer=document.getElementById("who-we-are-content-container");WhoWeArePanelProperties.Content=document.getElementById("who-we-are-content");WhoWeArePanelProperties.ContentMask=document.getElementById("who-we-are-content-mask");WhoWeArePanelProperties.NextArrow=document.getElementById("who-we-are-next-arrow");WhoWeArePanelProperties.UpArrow=document.getElementById("who-we-are-up-arrow");WhoWeArePanelProperties.DownArrow=document.getElementById("who-we-are-down-arrow");WhoWeArePanelProperties.ScrollbarBase=document.getElementById("who-we-are-scrollbar-base");WhoWeArePanelProperties.ScrollbarScrubber=document.getElementById("who-we-are-scrollbar-scrubber");WhoWeArePanelProperties.ScrollbarScrubberScrollColor="#597f71";WhoWeArePanelProperties.ScrollbarScrubberStaticColor="transparent";WhoWeArePanelProperties.PortraitContentShowPosition=10;WhoWeArePanelProperties.PortraitContentHidePosition=334;WhoWeArePanelProperties.HideTransitionCoordinates=new Framework.Controls.Coordinate(860,0);WhoWeArePanelProperties.Hide2TransitionCoordinates=new Framework.Controls.Coordinate(881,69);WhoWeArePanelProperties.ShowTransitionCoordinates=new Framework.Controls.Coordinate(187,0);WhoWeArePanelProperties.HomeTransitionCoordinates=new Framework.Controls.Coordinate(823,0);WhoWeArePanelProperties.HideTransitionPortraitCoordinates=new Framework.Controls.Coordinate(560,0);WhoWeArePanelProperties.Hide2TransitionPortraitCoordinates=new Framework.Controls.Coordinate(581,69);WhoWeArePanelProperties.ShowTransitionPortraitCoordinates=new Framework.Controls.Coordinate(187,0);WhoWeArePanelProperties.HomeTransitionPortraitCoordinates=new Framework.Controls.Coordinate(823,0);WhoWeArePanelProperties.TransitionDuration=Framework.IsiPad()?300:500;WhoWeArePanelProperties.MinWidth=this.PanelMinWidth;WhoWeArePanelProperties.MinHeight=this.PanelHeight;WhoWeArePanelProperties.MaxWidth=this.PanelWidth;WhoWeArePanelProperties.MaxHeight=this.PanelHeight;WhoWeArePanelProperties.PanelColor="#72A492";WhoWeArePanelProperties.PanelHoverColor="#57C09A";WhoWeArePanelProperties.PanelCollapseTriggers.push(document.getElementById("what-we-believe"));WhoWeArePanelProperties.PanelCollapseTriggers.push(document.getElementById("our-story"));WhoWeArePanelProperties.PanelCollapseTriggers.push(this.RineyLogo);this.WhoWeArePanel=new Riney.ContentPanel(WhoWeArePanelProperties);this.WhoWeArePanel.OnClick=Framework.CreateDelegate(this,this.WhoWeAreClickHandler);this.WhoWeArePanel.OnTransitionStart=Framework.CreateDelegate(this,this.TransitionStartHandler);this.WhoWeArePanel.OnTransitionComplete=Framework.CreateDelegate(this,this.TransitionCompleteHandler);};Riney.Page.prototype.InitContactsDrawer=function(ContactsDrawerElement,ContactsDrawerTriggerElement){this.ContactsDrawer=new Riney.ContactPanel(ContactsDrawerElement,ContactsDrawerTriggerElement,this.ContactDrawerWidth,this.ContactDrawerHeightCollapsed,this.ContactDrawerWidth,this.ContactDrawerHeightExpanded);this.ContactsDrawer.CollapsiblePanel.AddTrigger(new Framework.Controls.Trigger(this.RineyLogo,Framework.Events.MouseEvents.CLICK,Framework.Controls.CollapsiblePanelTriggerType.COLLAPSE));this.ContactsDrawer.CollapsiblePanel.AddTrigger(new Framework.Controls.Trigger(this.OurStoryPanel.PanelProperties.PanelElement,Framework.Events.MouseEvents.CLICK,Framework.Controls.CollapsiblePanelTriggerType.COLLAPSE));this.ContactsDrawer.CollapsiblePanel.AddTrigger(new Framework.Controls.Trigger(this.WhatWeBelievePanel.PanelProperties.PanelElement,Framework.Events.MouseEvents.CLICK,Framework.Controls.CollapsiblePanelTriggerType.COLLAPSE));this.ContactsDrawer.CollapsiblePanel.AddTrigger(new Framework.Controls.Trigger(this.WhoWeArePanel.PanelProperties.PanelElement,Framework.Events.MouseEvents.CLICK,Framework.Controls.CollapsiblePanelTriggerType.COLLAPSE));};Riney.Page.prototype.InitResizingBackground=function(){this.ResizingBackground=new Framework.Controls.ResizingBackground(this.ViewContainer,new Framework.Drawing.Dimension(1024,509));this.ResizingBackground.MinimumWidth=1024;this.ResizingBackground.MinimumHeight=509;this.ResizingBackground.OnResize=Framework.CreateDelegate(this,this.PageResizeHandler);};Riney.Page.prototype.InitClock=function(){this.Clock=new Framework.Controls.Clock(this.ClockTimeElement,this.ClockMeasureElement);this.Clock.GMT_Offset=8;this.Clock.UpdateClock();this.Clock.Start();};Riney.Page.prototype.ToggleOrientation=function(){if(window.orientation==0||window.orientation==180){this.ResizingBackground.MinimumWidth=768;this.ViewMask.style.minWidth=768+"px";this.ViewContainer.style.minWidth=768+"px";}else{this.ResizingBackground.MinimumWidth=1024;this.ViewMask.style.minWidth=1024+"px";this.ViewContainer.style.minWidth=1024+"px";}};Riney.Page.prototype.PageResizeHandler=function(){var screenDimmensions=this.ResizingBackground.GetPageDimensions();this.ViewWidth=screenDimmensions.Width;this.ViewHeight=screenDimmensions.Height-158;this.PanelHeight=this.ViewHeight-45;this.ContentMaskHeight=this.PanelHeight-80;if(this.ViewHeight>=this.ResizingBackground.MinimumHeight){this.RineySite.style.overflow="";this.ViewContainer.style.width=screenDimmensions.Width+"px";this.ViewContainer.style.height=this.ViewHeight+"px";this.OurStoryPanel.Resize(this.PanelHeight);this.WhatWeBelievePanel.Resize(this.PanelHeight);this.WhoWeArePanel.Resize(this.PanelHeight);}else{this.ViewContainer.style.width=screenDimmensions.Width+"px";this.RineySite.style.overflow="auto";}};Riney.Page.prototype.RineyLogoClickHandler=function(){this.OurStoryPanel.SendPanelHome();this.WhatWeBelievePanel.SendPanelHome();this.WhoWeArePanel.SendPanelHome();};Riney.Page.prototype.OurStoryClickHandler=function(){if(this.OurStoryPanel.CollapsiblePanel.m_PanelState==Framework.Controls.CollapsiblePanelState.EXPANDED){return;}this.OurStoryPanel.DeselectPanel();this.OurStoryPanel.ShowPanel();this.WhatWeBelievePanel.HidePanel();this.WhoWeArePanel.HidePanel2();};Riney.Page.prototype.WhatWeBelieveClickHandler=function(){if(this.WhatWeBelievePanel.CollapsiblePanel.m_PanelState==Framework.Controls.CollapsiblePanelState.EXPANDED){return;}this.WhatWeBelievePanel.DeselectPanel();this.OurStoryPanel.HidePanel();this.WhatWeBelievePanel.ShowPanel();this.WhoWeArePanel.HidePanel2();};Riney.Page.prototype.WhoWeAreClickHandler=function(){if(this.WhoWeArePanel.CollapsiblePanel.m_PanelState==Framework.Controls.CollapsiblePanelState.EXPANDED){return;}this.WhoWeArePanel.DeselectPanel();this.OurStoryPanel.HidePanel();this.WhatWeBelievePanel.HidePanel2();this.WhoWeArePanel.ShowPanel();};Riney.Page.prototype.OrientationChangeHandler=function(){this.ToggleOrientation();};Riney.Page.prototype.TransitionStartHandler=function(){this.Overlay.style.display=Framework.CSS.Display.BLOCK;};Riney.Page.prototype.TransitionCompleteHandler=function(){this.Overlay.style.display=Framework.CSS.Display.NONE;};Riney.Page.prototype.ClearSelection=function(){if(window.getSelection){window.getSelection().removeAllRanges();}else{document.selection.empty();}};Riney.Page.prototype.PreventDefault=function(e){e=e||window.event;e.preventDefault();};var page=null;Framework.AddHandler(window,"load",function(){OnPageLoad();});function OnPageLoad(){page=new Riney.Page();}
