function contentSwitch_EventStopBubble(A){if(A==null){A=window.event}if(A!=null){if(A.cancelBubble!=null){A.cancelBubble=true}if(A.returnValue!=null){A.returnValue=false}if(A.stopPropagation!=null){A.stopPropagation()}}return false}function contentSwitch_IsValidContent(A){if(A==null){return false}if(A.className==null){return false}if(A.className.indexOf("Separator")>=0){return false}if(A.className.indexOf("Next")>=0){return false}if(A.className.indexOf("Prev")>=0){return false}return true}function contentSwitch_SetInactive(A){if(A==null){return false}if(A.className==null){return false}var B=A.className.indexOf("Active");if(B>=0){A.className=A.className.substring(0,B)}return true}function contentSwitch_SetActive(A){if(A==null){return false}if(A.className==null){return false}var B=A.className.indexOf("Active");if(B<0){A.className=A.className+"Active"}return true}function contentSwitch_SetInactiveAll(A){if(typeof(A)=="string"){A=document.getElementById(A)}if(A==null){return null}for(i=0;i<A.childNodes.length;i++){e=A.childNodes[i];contentSwitch_SetInactive(e)}}function contentSwitch_SetActiveAll(A){if(typeof(A)=="string"){A=document.getElementById(A)}if(A==null){return null}for(i=0;i<A.childNodes.length;i++){e=A.childNodes[i];contentSwitch_SetActive(e)}}function contentSwitch_SetActiveSingle(A,B){if(typeof(A)=="string"){A=document.getElementById(A)}if(A==null){return null}for(i=0;i<A.childNodes.length;i++){e=A.childNodes[i];if(!contentSwitch_IsValidContent(e)){continue}if(e==B){contentSwitch_SetActive(e)}else{contentSwitch_SetInactive(e)}}}function contentSwitch_GetActive(A){if(typeof(A)=="string"){A=document.getElementById(A)}if(A==null){return null}for(i=0;i<A.childNodes.length;i++){e=A.childNodes[i];if(!contentSwitch_IsValidContent(e)){continue}j=e.className.indexOf("Active");if(j>=0){return e}}}function contentSwitch_GetSuccessor(A,B){if(A==null){return null}if(A.childNodes.length<=0){return null}e=(B!=null)?B.nextSibling:null;while(e!=null){if(contentSwitch_IsValidContent(e)){return e}e=e.nextSibling}e=A.childNodes[0];while(e!=null&&e!=B){if(contentSwitch_IsValidContent(e)){return e}e=e.nextSibling}return null}function contentSwitch_GetPredecessor(B,C){if(!contentSwitch_IsValidContent(C)){C=contentSwitch_GetSuccessor(C)}var A=C;while(A!=null){succ=contentSwitch_GetSuccessor(B,A);if(succ==null){return C}if(succ==C){return A}A=succ}return null}function contentSwitch_ExecuteSelectScript(A){if(A==null){return}if(A.onselectcustom==null){A.onselectcustom=A.getAttribute("onselectcustom")}if(typeof(A.onselectcustom)=="string"){A.onselectcustom=new Function(A.onselectcustom)}if(A.onselectcustom!=null){A.onselectcustom()}}function contentSwitch_SelectNext(A){if(typeof(A)=="string"){A=document.getElementById(A)}content=contentSwitch_GetActive(A);content=contentSwitch_GetSuccessor(A,content);contentSwitch_SetActiveSingle(A,content);contentSwitch_ExecuteSelectScript(content)}function contentSwitch_SelectPrev(A){if(typeof(A)=="string"){A=document.getElementById(A)}content=contentSwitch_GetActive(A);content=contentSwitch_GetPredecessor(A,content);contentSwitch_SetActiveSingle(A,content);contentSwitch_ExecuteSelectScript(content)}function contentSwitch_AutoSelectNext(C,A,B){if(typeof(C)=="string"){C=document.getElementById(C)}if(C==null){return false}if(B==null){B=1}if(typeof(C)=="string"){C=document.getElementById(C)}content=contentSwitch_GetActive(C);for(skipIndex=0;skipIndex<B;skipIndex++){content=contentSwitch_GetSuccessor(C,content)}contentSwitch_SetActiveSingle(C,content);contentSwitch_ExecuteSelectScript(content);C["timeoutHandle"]=setTimeout("contentSwitch_AutoSelectNext('"+C.id+"', "+A+")",A);return true}function contentSwitch_AutoSelectNext_Default(B,A){contentSwitch_AutoSelectNext(B,5000,A)}function contentSwitch_PauseTimer(A){if(typeof(A)=="string"){A=document.getElementById(A)}if(A==null){return false}handle=A["timeoutHandle"];clearTimeout(handle)}function contentSwitch_ContinueTimer(A){if(typeof(A)=="string"){A=document.getElementById(A)}if(A==null){return false}A["timeoutHandle"]=setTimeout("contentSwitch_AutoSelectNext_Default('"+A.id+"')",15000)}function contentSwitch_UserSelect(A,B){contentSwitch_PauseTimer(A);contentSwitch_SetActiveSingle(A,B);contentSwitch_ExecuteSelectScript(B);contentSwitch_ContinueTimer(A)}function contentSwitch_UserSelectPrev(A){contentSwitch_PauseTimer(A);contentSwitch_SelectPrev(A);contentSwitch_ContinueTimer(A)}function contentSwitch_UserSelectNext(A){contentSwitch_PauseTimer(A);contentSwitch_SelectNext(A);contentSwitch_ContinueTimer(A)}var adSwitch_Crossfade_timeout;function adSwitch_SetClassNameUrl(D,C,A,B){if(D==null){return}if(C==null){return}D.className=A;C.onselectcustom="window.location.href='"+B+"'"}function adSwitch_SetClassNameUrl_Parented(D,C,E,A,B){adMainControl=D;for(i=0;adMainControl!=null&&i<C;i++){adMainControl=adMainControl.parentNode}adLinkControl=D;for(i=0;adLinkControl!=null&&i<E;i++){adLinkControl=adLinkControl.parentNode}adSwitch_SetClassNameUrl(adMainControl,adLinkControl,A,B)}function adSwitch_SetImageFade_Parented(C,B,D,E,A){adMainControl=C;for(i=0;adMainControl!=null&&i<B;i++){adMainControl=adMainControl.parentNode}adLinkControl=C;for(i=0;adLinkControl!=null&&i<D;i++){adLinkControl=adLinkControl.parentNode}if(adMainControl==null){return}if(adLinkControl==null){return}adLinkControl.onselectcustom="window.location.href='"+A+"'";backImageIndex=0;eCurrentImage=null;ePreviousImage=null;for(i=0;i<adMainControl.childNodes.length;i++){e=adMainControl.childNodes[i];if(e.className!="adBackgroundImage"){continue}if(e["timeoutHandle"]!=null){clearTimeout(e["timeoutHandle"]);e["timeoutHandle"]=null}if(E==backImageIndex){e.style.visibility="visible";e.style.zIndex=2;eCurrentImage=e}else{if(e.style.zIndex==2){ePreviousImage=e;e.style.zIndex=1}else{e.style.zIndex=0;e.style.visibility="hidden"}e.style.opacity=1;e.style.filter=""}backImageIndex++}if(eCurrentImage!=null&&ePreviousImage!=null){adSwitch_FadeImage(eCurrentImage.id,null,600)}}function adSwitch_FadeImage(B,A,C){now=new Date();if(A==null||A==0){A=now.getTime()}timeCurrent=now.getTime()-A;fadePosition=timeCurrent/C;if(timeCurrent>C){timeCurrent=C}if(typeof(B)=="string"){B=document.getElementById(B)}if(B!=null){opacity=fadePosition;if(document.all){B.style.filter="alpha(opacity="+Math.round(opacity*100)+")"}else{B.style.opacity=opacity}if(timeCurrent<C){B["timeoutHandle"]=setTimeout("adSwitch_FadeImage('"+B.id+"', "+A+", "+C+")",30)}}};function elementControl_EventStopBubble(A){if(A==null){A=window.event}if(A!=null){if(A.cancelBubble!=null){A.cancelBubble=true}if(A.returnValue!=null){A.returnValue=false}if(A.stopPropagation!=null){A.stopPropagation()}}return false}function elementControl_SetAnchor(C,A,B){if(typeof(C)=="string"){C=document.getElementById(C)}if(C==null){return false}C.innerHTML=A;C.href=B;C.target="_blank";return true}function elementControl_ComposeEmailAnchor(D,C,E,A,B){email=C+"@"+E;link="mailto:"+email;if(A!=null){link="?subject="+A;if(B!=null){link="&body="+B}}return elementControl_SetAnchor(D,email,link)}function elementControl_ReplaceEmailAnchor(D,C,E,A,B){if(typeof(D)=="string"){D=document.getElementById(D)}if(D==null){return false}id=D.id;ep=D.parentNode;newElement=document.createElement("a");ep.insertBefore(newElement,D);ep.removeChild(D);newElement.id=id;elementControl_ComposeEmailAnchor(newElement,C,E,A,B)}function elementControl_SetVisibility(B,A){if(typeof(B)=="string"){B=document.getElementById(B)}if(B==null){return false}if(typeof(A)=="boolean"){B.style.display=(A)?"inline":"none"}else{B.style.display=A}}function elementControl_SetValue(B,A){if(typeof(B)=="string"){B=document.getElementById(B)}if(B==null){return null}B.value=(A==null)?"":A;return B}function elementControl_OpenWindowWithValueURL(A){if(typeof(A)=="string"){A=document.getElementById(A)}if(A!=null){window.open(A.value)}};function gallery_getScollPosition(){if(document.documentElement){return{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}}else{if(document.all){return{x:document.body.scrollLeft,y:document.body.scrollTop}}else{return{x:window.pageXOffset,y:window.pageYOffset}}}}function gallery_getWindowSize(){if(document.documentElement){return{x:document.documentElement.clientWidth,y:document.documentElement.clientHeight}}else{if(document.all){return{x:document.body.clientWidth,y:document.body.clientHeight}}else{return{x:window.innerWidth,y:window.innerHeight}}}}function galleryInit(A){eBody=document.body;eTrap=document.createElement("div");eTrap.id="galleryTrap";eBorder=document.createElement("div");eBorder.id="galleryBorder";eBorder.onclick=galleryClose;eContainer=document.createElement("div");eContainer.id="galleryContainer";eContainer.innerHTML='<iframe src="'+A+'" style="width:100%; height:100%; background-color:transparent;" scrolling="no" frameborder="0" allowtransparency="true" id="galleryFrame" name="galleryFrame" width="100%" height="100%"></iframe>';eBody.appendChild(eTrap);eBody.appendChild(eBorder);eBody.appendChild(eContainer);eContainer.style.visibility="hidden";if(document.all){window.attachEvent("onscroll",galleryScroll);window.attachEvent("onresize",galleryResize)}else{eTrap.style.position="fixed";eBorder.style.position="fixed";eContainer.style.position="fixed";window.onresize=galleryResize}galleryScroll_FixPositions();galleryCrossFade(0.7,0,200)}function galleryInitOnClick(A,B){galleryInit(B);return elementControl_EventStopBubble(A)}function galleryScroll(){galleryScroll_FixPositions(true)}function galleryResize(){galleryScroll_FixPositions(false)}function galleryScroll_FixPositions(A){scrollPos=gallery_getScollPosition();windowSize=gallery_getWindowSize();midX=(windowSize.x/2)+scrollPos.x;midY=(windowSize.y/2)+scrollPos.y;if(document.all==null){midY=(windowSize.y/2)}eTrap=document.getElementById("galleryTrap");eBorder=document.getElementById("galleryBorder");eContainer=document.getElementById("galleryContainer");if(eTrap!=null){eTrap.style.left=(midX-(eTrap.offsetWidth/2))+"px";eTrap.style.top=(midY-(eTrap.offsetHeight/2))+"px"}if(eBorder!=null){eBorder.style.left=(midX-(eBorder.offsetWidth/2))+"px";eBorder.style.top=(midY-(eBorder.offsetHeight/2))+"px"}if(eBorder!=null){eContainer.style.left=(midX-(eContainer.offsetWidth/2))+"px";eContainer.style.top=(midY-(eContainer.offsetHeight/2))+"px"}}function galleryClose(){eBody=parent.document.body;if(eBody==null){return}eTrap=parent.document.getElementById("galleryTrap");if(eTrap!=null){eBody.removeChild(eTrap)}eBorder=parent.document.getElementById("galleryBorder");if(eBorder!=null){eBody.removeChild(eBorder)}eContainer=parent.document.getElementById("galleryContainer");if(eContainer!=null){eBody.removeChild(eContainer)}}function galleryOpenDocument(B,A){docWindow=window.open(B,"_blank");if(docWindow==null){return}}function galleryCrossFade(A,B,C){now=new Date();if(B==null||B==0){B=now.getTime()}timeCurrent=now.getTime()-B;fadePosition=timeCurrent/C;if(timeCurrent>C){timeCurrent=C}eBorder=document.getElementById("galleryBorder");eContainer=parent.document.getElementById("galleryContainer");if(eBorder!=null){opacity=fadePosition*A;if(document.all){eBorder.style.filter="alpha(opacity="+Math.round(opacity*100)+")"}else{eBorder.style.opacity=opacity}if(timeCurrent<C){setTimeout("galleryCrossFade("+A+", "+B+", "+C+")",30)}else{eContainer.style.visibility="visible"}}};function imageControl_GetEventTarget(A){if(!A){A=event}if(A){if(A.srcElement){return A.srcElement}if(A.target){return A.target}}return null}function imageControl_HotCoolHoverSequence_OnOver(A){A=imageControl_GetEventTarget(A);if(A==null){return}if(A.src){A.src=A.src.replace("cool","hot")}else{if(A.style){A.style.backgroundImage=A.style.backgroundImage.replace("cool","hot")}else{if(A.currentStyle){s=A.currentStyle.backgroundImage.replace("cool","hot");A.currentStyle.backgroundImage=s}}}}function imageControl_HotCoolHoverSequence_OnOut(A){A=imageControl_GetEventTarget(A);if(A==null){return}if(A.src){A.src=A.src.replace("hot","cool")}else{if(A.style){A.style.backgroundImage=A.style.backgroundImage.replace("hot","cool")}else{if(A.currentStyle){s=A.currentStyle.backgroundImage.replace("cool","hot");A.currentStyle.backgroundImage=s}}}}function imageControl_HotCoolHoverSequence_OnMouseDown(A){A=imageControl_GetEventTarget(A);if(A==null){return}navurl=A.getAttribute("navigateurl");if(navurl){document.location.href=navurl}}function imageControl_HotCoolHoverSequence_Install(A,B){if(typeof(A)=="string"){A=document.getElementById(A)}A.onmouseover=imageControl_HotCoolHoverSequence_OnOver;A.onmouseout=imageControl_HotCoolHoverSequence_OnOut;if(B!=null){if(A.src){A.src=B}else{if(A.style&&A.style.backgroundImage){A.style.backgroundImage=B}}A.onmouseout(A)}navurl=A.getAttribute("navigateurl");if(navurl){A.onmousedown=imageControl_HotCoolHoverSequence_OnMouseDown}}function imageControl_HotCoolHoverSequence_InstallList(A,B){for(i=0;i<A.length;i++){imageControl_HotCoolHoverSequence_Install(A[i])}}function imageControl_HotCoolHoverSequence_InstallTagClass(A,C,B){elementList=document.getElementsByTagName(A);for(i=0;i<elementList.length;i++){if(C==null||elementList[i].className==C){imageControl_HotCoolHoverSequence_Install(elementList[i])}}};function ModalWindow(instanceVariableName,cssClassPrefix,resultElementId){this.instanceVariableName=instanceVariableName;this.cssClassPrefix=(cssClassPrefix==null||cssClassPrefix=="")?"modalWindow":cssClassPrefix;this.windowContentUrl="";this.resultElementId=resultElementId;function GetScrollPosition(){if(document.documentElement){return{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}}else{if(document.all){return{x:document.body.scrollLeft,y:document.body.scrollTop}}else{return{x:window.pageXOffset,y:window.pageYOffset}}}}function GetWindowSize(){if(document.documentElement){return{x:document.documentElement.clientWidth,y:document.documentElement.clientHeight}}else{if(document.all){return{x:document.body.clientWidth,y:document.body.clientHeight}}else{return{x:window.innerWidth,y:window.innerHeight}}}}function WindowScroll(){this.WindowScroll_FixPositions(true)}function WindowResize(){this.WindowScroll_FixPositions(false)}function WindowScroll_FixPositions(isScrolling){scrollPos=this.GetScrollPosition();windowSize=this.GetWindowSize();midX=(windowSize.x/2)+scrollPos.x;midY=(windowSize.y/2)+scrollPos.y;if(document.all==null){midY=(windowSize.y/2)}eTrap=document.getElementById(this.instanceVariableName+"Trap");eBorder=document.getElementById(this.instanceVariableName+"Border");eContainer=document.getElementById(this.instanceVariableName+"Container");if(eTrap!=null){eTrap.style.left=(midX-(eTrap.offsetWidth/2))+"px";eTrap.style.top=(midY-(eTrap.offsetHeight/2))+"px"}if(eBorder!=null){eBorder.style.left=(midX-(eBorder.offsetWidth/2))+"px";eBorder.style.top=(midY-(eBorder.offsetHeight/2))+"px"}if(eBorder!=null){eContainer.style.left=(midX-(eContainer.offsetWidth/2))+"px";eContainer.style.top=(midY-(eContainer.offsetHeight/2))+"px"}}function Close(resultValue){eBody=parent.document.body;if(eBody==null){return}eTrap=parent.document.getElementById(this.instanceVariableName+"Trap");if(eTrap!=null){eBody.removeChild(eTrap)}eBorder=parent.document.getElementById(this.instanceVariableName+"Border");if(eBorder!=null){eBody.removeChild(eBorder)}eContainer=parent.document.getElementById(this.instanceVariableName+"Container");if(eContainer!=null){eBody.removeChild(eContainer)}if(this.resultElementId!=null&&resultValue!=null){element=elementControl_SetValue(this.resultElementId,resultValue);if(element!=null&&element.onchange!=null){element.onchange()}}}function WindowCrossFade(targetAlpha,timeStart,timeTotal){now=new Date();if(timeStart==null||timeStart==0){timeStart=now.getTime()}timeCurrent=now.getTime()-timeStart;fadePosition=timeCurrent/timeTotal;if(timeCurrent>timeTotal){timeCurrent=timeTotal}eBorder=document.getElementById(this.instanceVariableName+"Border");eContainer=parent.document.getElementById(this.instanceVariableName+"Container");if(eBorder!=null){opacity=fadePosition*targetAlpha;if(document.all){eBorder.style.filter="alpha(opacity="+Math.round(opacity*100)+")"}else{eBorder.style.opacity=opacity}if(timeCurrent<timeTotal){setTimeout(this.instanceVariableName+".WindowCrossFade("+targetAlpha+", "+timeStart+", "+timeTotal+")",30)}else{eContainer.style.visibility="visible"}}}function DoModal(){eBody=document.body;eTrap=document.createElement("div");eTrap.id=this.instanceVariableName+"Trap";eTrap.className=this.cssClassPrefix+"Trap";eBorder=document.createElement("div");eBorder.id=this.instanceVariableName+"Border";eBorder.className=this.cssClassPrefix+"Border";eContainer=document.createElement("div");eContainer.id=this.instanceVariableName+"Container";eContainer.className=this.cssClassPrefix+"Container";frameName=this.instanceVariableName+"Frame";eContainer.innerHTML='<iframe src="'+this.windowContentUrl+'" style="width:100%; height:100%; background-color:transparent;" scrolling="no" frameborder="0" allowtransparency="true" id="'+frameName+'" name="'+frameName+'" width="100%" height="100%"></iframe>';eBody.appendChild(eTrap);eBody.appendChild(eBorder);eBody.appendChild(eContainer);eContainer.style.visibility="hidden";if(document.all){eval("tmpOnScrollEventFunction = function() { "+this.instanceVariableName+".WindowScroll(); }");window.attachEvent("onscroll",tmpOnScrollEventFunction);eval("tmpOnResizeEventFunction = function() { "+this.instanceVariableName+".WindowResize(); }");window.attachEvent("onresize",tmpOnResizeEventFunction)}else{eTrap.style.position="fixed";eBorder.style.position="fixed";eContainer.style.position="fixed";eval("tmpOnResizeEventFunction = function() { "+this.instanceVariableName+".WindowResize(); }");window.onresize=tmpOnResizeEventFunction}this.WindowScroll_FixPositions();this.WindowCrossFade(0.7,0,200)}function InitOnClick(e,url){this.windowContentUrl=url;this.DoModal();return elementControl_EventStopBubble(e)}this.GetScrollPosition=GetScrollPosition;this.GetWindowSize=GetWindowSize;this.WindowScroll=WindowScroll;this.WindowResize=WindowResize;this.WindowScroll_FixPositions=WindowScroll_FixPositions;this.WindowCrossFade=WindowCrossFade;this.DoModal=DoModal;this.Close=Close;this.InitOnClick=InitOnClick}function ModalWindowScroll(){alert("jjj");alert(window.name)}function ModalWindowClose(A){frameName=window.name;instanceName=frameName.substring(0,frameName.length-("Frame").length);parent[instanceName].Close(A)};
