
(function($,window){
var
defaults={
transition:"elastic",
speed:300,
width:false,
initialWidth:"600",
innerWidth:false,
maxWidth:false,
height:false,
initialHeight:"450",
innerHeight:false,
maxHeight:false,
scalePhotos:true,
scrolling:true,
inline:false,
html:false,
iframe:false,
photo:false,
href:false,
title:false,
rel:false,
opacity:0.9,
preloading:true,
current:"image {current} of {total}",
previous:"previous",
next:"next",
close:"close",
open:false,
loop:true,
slideshow:false,
slideshowAuto:true,
slideshowSpeed:2500,
slideshowStart:"start slideshow",
slideshowStop:"stop slideshow",
onOpen:false,
onLoad:false,
onComplete:false,
onCleanup:false,
onClosed:false,
overlayClose:true,
escKey:true,
arrowKey:true},
colorbox='colorbox',
prefix='cbox',
event_open=prefix +'_open',
event_load=prefix +'_load',
event_complete=prefix +'_complete',
event_cleanup=prefix +'_cleanup',
event_closed=prefix +'_closed',
isIE=$.browser.msie&&!$.support.opacity,
isIE6=isIE&&$.browser.version<7,
event_ie6=prefix +'_IE6',
$overlay,
$box,
$wrap,
$content,
$topBorder,
$leftBorder,
$rightBorder,
$bottomBorder,
$related,
$window,
$loaded,
$loadingBay,
$loadingOverlay,
$title,
$current,
$slideshow,
$next,
$prev,
$close,
interfaceHeight,
interfaceWidth,
loadedHeight,
loadedWidth,
element,
bookmark,
index,
settings,
open,
active,
publicMethod,
boxElement=prefix +'Element';
function $div(id,css){
id=id?' id="'+ prefix + id +'"':'';
css=css?' style="'+ css +'"':'';
return $('<div'+ id + css +'/>');}
function setSize(size,dimension){
dimension=dimension==='x'?$window.width():$window.height();
return(typeof size==='string')?Math.round((size.match(/%/)?(dimension/100)*parseInt(size,10):parseInt(size,10))):size;}
function isImage(url){
url=$.isFunction(url)?url.call(element):url;
return settings.photo||url.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i);}
function process(){
for(var i in settings){
if($.isFunction(settings[i])&&i.substring(0,2)!=='on'){
settings[i]=settings[i].call(element);}}
settings.rel=settings.rel||element.rel||'nofollow';
settings.href=settings.href||$(element).attr('href');
settings.title=settings.title||element.title;}
function launch(elem){
element=elem;
settings=$.extend({},$(element).data(colorbox));
process();
if(settings.rel!=='nofollow'){
$related=$('.'+ boxElement).filter(function(){
var relRelated=$(this).data(colorbox).rel||this.rel;
return(relRelated===settings.rel);});
index=$related.index(element);
if(index===-1){
$related=$related.add(element);
index=$related.length - 1;}}else{
$related=$(element);
index=0;}
if(!open){
open=active=true;
bookmark=element;
try{
bookmark.blur();}catch(e){}
$.event.trigger(event_open);
if(settings.onOpen){
settings.onOpen.call(element);}
$overlay.css({"opacity":+settings.opacity,"cursor":settings.overlayClose?"pointer":"auto"}).show();
settings.w=setSize(settings.initialWidth,'x');
settings.h=setSize(settings.initialHeight,'y');
publicMethod.position(0);
if(isIE6){
$window.bind('resize.'+ event_ie6 +' scroll.'+ event_ie6,function(){
$overlay.css({width:$window.width(),height:$window.height(),top:$window.scrollTop(),left:$window.scrollLeft()});}).trigger('scroll.'+ event_ie6);}}
$current.add($prev).add($next).add($slideshow).add($title).hide();
$close.html(settings.close).show();
publicMethod.slideshow();
publicMethod.load();}
publicMethod=$.fn[colorbox]=$[colorbox]=function(options,callback){
var $this=this;
if(!$this[0]&&$this.selector){
return $this;}
options=options||{};
if(callback){
options.onComplete=callback;}
if(!$this[0]||$this.selector===undefined){
$this=$('<a/>');
options.open=true;}
$this.each(function(){
$(this).data(colorbox,$.extend({},$(this).data(colorbox)||defaults,options)).addClass(boxElement);});
if(options.open){
launch($this[0]);}
return $this;};
publicMethod.init=function(){
$window=$(window);
$box=$div().attr({id:colorbox,'class':isIE?prefix +'IE':''});
$overlay=$div("Overlay",isIE6?'position:absolute':'').hide();
$wrap=$div("Wrapper");
$content=$div("Content").append(
$loaded=$div("LoadedContent",'width:0; height:0'),
$loadingOverlay=$div("LoadingOverlay").add($div("LoadingGraphic")),
$title=$div("Title"),
$current=$div("Current"),
$next=$div("Next"),
$prev=$div("Previous"),
$slideshow=$div("Slideshow"),
$close=$div("Close"));
$wrap.append(
$div().append(
$div("TopLeft"),
$topBorder=$div("TopCenter"),
$div("TopRight")),
$div().append(
$leftBorder=$div("MiddleLeft"),
$content,
$rightBorder=$div("MiddleRight")),
$div().append(
$div("BottomLeft"),
$bottomBorder=$div("BottomCenter"),
$div("BottomRight"))).children().children().css({'float':'left'});
$loadingBay=$div(false,'position:absolute; width:9999px; visibility:hidden; display:none');
$('body').prepend($overlay,$box.append($wrap,$loadingBay));
$content.children().hover(function(){
$(this).addClass('hover');},function(){
$(this).removeClass('hover');}).addClass('hover');
interfaceHeight=$topBorder.height()+ $bottomBorder.height()+ $content.outerHeight(true)- $content.height();
interfaceWidth=$leftBorder.width()+ $rightBorder.width()+ $content.outerWidth(true)- $content.width();
loadedHeight=$loaded.outerHeight(true);
loadedWidth=$loaded.outerWidth(true);
$box.css({"padding-bottom":interfaceHeight,"padding-right":interfaceWidth}).hide();
$next.click(publicMethod.next);
$prev.click(publicMethod.prev);
$close.click(publicMethod.close);
$content.children().removeClass('hover');
$('.'+ boxElement).live('click',function(e){
if((e.button!==0&&typeof e.button!=='undefined')||e.ctrlKey||e.shiftKey||e.altKey){
return true;}else{
launch(this);
return false;}});
$overlay.click(function(){
if(settings.overlayClose){
publicMethod.close();}});
$(document).bind("keydown",function(e){
if(open&&settings.escKey&&e.keyCode===27){
e.preventDefault();
publicMethod.close();}
if(open&&settings.arrowKey&&!active&&$related[1]){
if(e.keyCode===37&&(index||settings.loop)){
e.preventDefault();
$prev.click();}else if(e.keyCode===39&&(index<$related.length - 1||settings.loop)){
e.preventDefault();
$next.click();}}});};
publicMethod.remove=function(){
$box.add($overlay).remove();
$('.'+ boxElement).die('click').removeData(colorbox).removeClass(boxElement);};
publicMethod.position=function(speed,loadedCallback){
var
animate_speed,
posTop=Math.max($window.height()- settings.h - loadedHeight - interfaceHeight,0)/2 + $window.scrollTop(),
posLeft=Math.max($window.width()- settings.w - loadedWidth - interfaceWidth,0)/2 + $window.scrollLeft();
animate_speed=($box.width()===settings.w + loadedWidth&&$box.height()===settings.h + loadedHeight)?0:speed;
$wrap[0].style.width=$wrap[0].style.height="9999px";
function modalDimensions(that){
$topBorder[0].style.width=$bottomBorder[0].style.width=$content[0].style.width=that.style.width;
$loadingOverlay[0].style.height=$loadingOverlay[1].style.height=$content[0].style.height=$leftBorder[0].style.height=$rightBorder[0].style.height=that.style.height;}
$box.dequeue().animate({width:settings.w + loadedWidth,height:settings.h + loadedHeight,top:posTop,left:posLeft},{
duration:animate_speed,
complete:function(){
modalDimensions(this);
active=false;
$wrap[0].style.width=(settings.w + loadedWidth + interfaceWidth)+"px";
$wrap[0].style.height=(settings.h + loadedHeight + interfaceHeight)+"px";
if(loadedCallback){
loadedCallback();}},
step:function(){
modalDimensions(this);}});};
publicMethod.resize=function(options){
if(open){
options=options||{};
if(options.width){
settings.w=setSize(options.width,'x')- loadedWidth - interfaceWidth;}
if(options.innerWidth){
settings.w=setSize(options.innerWidth,'x');}
$loaded.css({width:settings.w});
if(options.height){
settings.h=setSize(options.height,'y')- loadedHeight - interfaceHeight;}
if(options.innerHeight){
settings.h=setSize(options.innerHeight,'y');}
if(!options.innerHeight&&!options.height){
var $child=$loaded.wrapInner("<div style='overflow:auto'></div>").children();
settings.h=$child.height();
$child.replaceWith($child.children());}
$loaded.css({height:settings.h});
publicMethod.position(settings.transition==="none"?0:settings.speed);}};
publicMethod.prep=function(object){
if(!open){
return;}
var photo,
speed=settings.transition==="none"?0:settings.speed;
$window.unbind('resize.'+ prefix);
$loaded.remove();
$loaded=$div('LoadedContent').html(object);
function getWidth(){
settings.w=settings.w||$loaded.width();
settings.w=settings.mw&&settings.mw<settings.w?settings.mw:settings.w;
return settings.w;}
function getHeight(){
settings.h=settings.h||$loaded.height();
settings.h=settings.mh&&settings.mh<settings.h?settings.mh:settings.h;
return settings.h;}
$loaded.hide().appendTo($loadingBay.show()).css({width:getWidth(),overflow:settings.scrolling?'auto':'hidden'}).css({height:getHeight()}).prependTo($content);
$loadingBay.hide();
$('#'+ prefix +'Photo').css({cssFloat:'none'});
if(isIE6){
$('select').not($box.find('select')).filter(function(){
return this.style.visibility!=='hidden';}).css({'visibility':'hidden'}).one(event_cleanup,function(){
this.style.visibility='inherit';});}
function setPosition(s){
var prev,prevSrc,next,nextSrc,total=$related.length,loop=settings.loop;
publicMethod.position(s,function(){
function defilter(){
if(isIE){
$box[0].style.removeAttribute("filter");}}
if(!open){
return;}
if(isIE){
if(photo){
$loaded.fadeIn(100);}}
if(settings.iframe){
$("<iframe frameborder=0"+(settings.scrolling?"":" scrolling='no'")+(isIE?" allowtransparency='true'":'')+"/>").attr({src:settings.href,name:new Date().getTime()}).appendTo($loaded);}
$loaded.show();
$title.show().html(settings.title);
if(total>1){
$current.html(settings.current.replace(/\{current\}/,index + 1).replace(/\{total\}/,total)).show();
$next[(loop||index<total - 1)?"show":"hide"]().html(settings.next);
$prev[(loop||index)?"show":"hide"]().html(settings.previous);
prev=index?$related[index - 1]:$related[total - 1];
next=index<total - 1?$related[index + 1]:$related[0];
if(settings.slideshow){
$slideshow.show();
if(index===total - 1&&!loop&&$box.is('.'+ prefix +'Slideshow_on')){
$slideshow.click();}}
if(settings.preloading){
nextSrc=$(next).data(colorbox).href||next.href;
prevSrc=$(prev).data(colorbox).href||prev.href;
if(isImage(nextSrc)){
$('<img/>')[0].src=nextSrc;}
if(isImage(prevSrc)){
$('<img/>')[0].src=prevSrc;}}}
$loadingOverlay.hide();
if(settings.transition==='fade'){
$box.fadeTo(speed,1,function(){
defilter();});}else{
defilter();}
$window.bind('resize.'+ prefix,function(){
publicMethod.position(0);});
$.event.trigger(event_complete);
if(settings.onComplete){
settings.onComplete.call(element);}});}
if(settings.transition==='fade'){
$box.fadeTo(speed,0,function(){
setPosition(0);});}else{
setPosition(speed);}};
publicMethod.load=function(){
var href,img,setResize,prep=publicMethod.prep;
active=true;
element=$related[index];
settings=$.extend({},$(element).data(colorbox));
process();
$.event.trigger(event_load);
if(settings.onLoad){
settings.onLoad.call(element);}
settings.h=settings.height?
setSize(settings.height,'y')- loadedHeight - interfaceHeight:
settings.innerHeight&&setSize(settings.innerHeight,'y');
settings.w=settings.width?
setSize(settings.width,'x')- loadedWidth - interfaceWidth:
settings.innerWidth&&setSize(settings.innerWidth,'x');
settings.mw=settings.w;
settings.mh=settings.h;
if(settings.maxWidth){
settings.mw=setSize(settings.maxWidth,'x')- loadedWidth - interfaceWidth;
settings.mw=settings.w&&settings.w<settings.mw?settings.w:settings.mw;}
if(settings.maxHeight){
settings.mh=setSize(settings.maxHeight,'y')- loadedHeight - interfaceHeight;
settings.mh=settings.h&&settings.h<settings.mh?settings.h:settings.mh;}
href=settings.href;
$loadingOverlay.show();
if(settings.inline){
$div('InlineTemp').hide().insertBefore($(href)[0]).bind(event_load +' '+ event_cleanup,function(){
$(this).replaceWith($loaded.children());});
prep($(href));}else if(settings.iframe){
prep(" ");}else if(settings.html){
prep(settings.html);}else if(isImage(href)){
img=new Image();
img.onload=function(){
var percent;
img.onload=null;
img.id=prefix +'Photo';
$(img).css({margin:'auto',border:'none',display:'block',cssFloat:'left'});
if(settings.scalePhotos){
setResize=function(){
img.height -=img.height*percent;
img.width -=img.width*percent;};
if(settings.mw&&img.width>settings.mw){
percent=(img.width - settings.mw)/img.width;
setResize();}
if(settings.mh&&img.height>settings.mh){
percent=(img.height - settings.mh)/img.height;
setResize();}}
if(settings.h){
img.style.marginTop=Math.max(settings.h - img.height,0)/2 +'px';}
setTimeout(function(){
prep(img);},1);
if($related[1]&&(index<$related.length - 1||settings.loop)){
$(img).css({cursor:'pointer'}).click(publicMethod.next);}
if(isIE){
img.style.msInterpolationMode='bicubic';}};
img.src=href;}else{
$div().appendTo($loadingBay).load(href,function(data,status,xhr){
prep(status==='error'?'Request unsuccessful: '+ xhr.statusText:this);});}};
publicMethod.next=function(){
if(!active){
index=index<$related.length - 1?index + 1:0;
publicMethod.load();}};
publicMethod.prev=function(){
if(!active){
index=index?index - 1:$related.length - 1;
publicMethod.load();}};
publicMethod.slideshow=function(){
var stop,timeOut,className=prefix +'Slideshow_';
$slideshow.bind(event_closed,function(){
$slideshow.unbind();
clearTimeout(timeOut);
$box.removeClass(className +"off "+ className +"on");});
function start(){
$slideshow.text(settings.slideshowStop).bind(event_complete,function(){
timeOut=setTimeout(publicMethod.next,settings.slideshowSpeed);}).bind(event_load,function(){
clearTimeout(timeOut);}).one("click",function(){
stop();});
$box.removeClass(className +"off").addClass(className +"on");}
stop=function(){
clearTimeout(timeOut);
$slideshow.text(settings.slideshowStart).unbind(event_complete +' '+ event_load).one("click",function(){
start();
timeOut=setTimeout(publicMethod.next,settings.slideshowSpeed);});
$box.removeClass(className +"on").addClass(className +"off");};
if(settings.slideshow&&$related[1]){
if(settings.slideshowAuto){
start();}else{
stop();}}};
publicMethod.close=function(){
if(open){
open=false;
$.event.trigger(event_cleanup);
if(settings.onCleanup){
settings.onCleanup.call(element);}
$window.unbind('.'+ prefix +' .'+ event_ie6);
$overlay.fadeTo('fast',0);
$box.stop().fadeTo('fast',0,function(){
$box.find('iframe').attr('src','about:blank');
$loaded.remove();
$box.add($overlay).css({'opacity':1,cursor:'auto'}).hide();
try{
bookmark.focus();}catch(e){}
setTimeout(function(){
$.event.trigger(event_closed);
if(settings.onClosed){
settings.onClosed.call(element);}},1);});}};
publicMethod.element=function(){
return $(element);};
publicMethod.settings=defaults;
$(publicMethod.init);}(jQuery,this));
google.load("search","1",{"nocss":true});
function OnLoad()
{
var siteSearch=new google.search.WebSearch();
siteSearch.setSiteRestriction("http://www.siersemaonroerendgoed.nl");
var options=new google.search.SearcherOptions();
options.setExpandMode(google.search.SearchControl.EXPAND_MODE_OPEN);
options.setRoot(document.getElementById("searchcontrol"));
var searchControl=new google.search.SearchControl();
searchControl.setLinkTarget(google.search.Search.LINK_TARGET_SELF);
searchControl.setResultSetSize(google.search.Search.SMALL_RESULTSET);
searchControl.addSearcher(siteSearch,options);
searchControl.setNoResultsString(google.search.SearchControl.NO_RESULTS_DEFAULT_STRING)
searchControl.setSearchCompleteCallback(null,function(searchControl,searcher){
$.colorbox({width:700,height:540,inline:true,href:"#searchContainer"});});
var drawOptions=new google.search.DrawOptions();
drawOptions.setDrawMode(google.search.SearchControl.DRAW_MODE_TABBED)
drawOptions.setSearchFormRoot(document.getElementById("Search"));
searchControl.draw(null,drawOptions);}
google.setOnLoadCallback(OnLoad);
(function(D){var A="Lite-1.0";D.fn.cycle=function(E){return this.each(function(){E=E||{};if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=0;this.cyclePause=0;var I=D(this);var J=E.slideExpr?D(E.slideExpr,this):I.children();var G=J.get();if(G.length<2){if(window.console&&window.console.log){window.console.log("terminating; too few slides: "+G.length)}return}var H=D.extend({},D.fn.cycle.defaults,E||{},D.metadata?I.metadata():D.meta?I.data():{});H.before=H.before?[H.before]:[];H.after=H.after?[H.after]:[];H.after.unshift(function(){H.busy=0});var F=this.className;H.width=parseInt((F.match(/w:(\d+)/)||[])[1])||H.width;H.height=parseInt((F.match(/h:(\d+)/)||[])[1])||H.height;H.timeout=parseInt((F.match(/t:(\d+)/)||[])[1])||H.timeout;if(I.css("position")=="static"){I.css("position","relative")}if(H.width){I.width(H.width)}if(H.height&&H.height!="auto"){I.height(H.height)}var K=0;J.css({position:"absolute",top:0,left:0}).hide().each(function(M){D(this).css("z-index",G.length-M)});D(G[K]).css("opacity",1).show();if(D.browser.msie){G[K].style.removeAttribute("filter")}if(H.fit&&H.width){J.width(H.width)}if(H.fit&&H.height&&H.height!="auto"){J.height(H.height)}if(H.pause){I.hover(function(){this.cyclePause=1},function(){this.cyclePause=0})}D.fn.cycle.transitions.fade(I,J,H);J.each(function(){var M=D(this);this.cycleH=(H.fit&&H.height)?H.height:M.height();this.cycleW=(H.fit&&H.width)?H.width:M.width()});J.not(":eq("+K+")").css({opacity:0});if(H.cssFirst){D(J[K]).css(H.cssFirst)}if(H.timeout){if(H.speed.constructor==String){H.speed={slow:600,fast:200}[H.speed]||400}if(!H.sync){H.speed=H.speed/2}while((H.timeout-H.speed)<250){H.timeout+=H.speed}}H.speedIn=H.speed;H.speedOut=H.speed;H.slideCount=G.length;H.currSlide=K;H.nextSlide=1;var L=J[K];if(H.before.length){H.before[0].apply(L,[L,L,H,true])}if(H.after.length>1){H.after[1].apply(L,[L,L,H,true])}if(H.click&&!H.next){H.next=H.click}if(H.next){D(H.next).bind("click",function(){return C(G,H,H.rev?-1:1)})}if(H.prev){D(H.prev).bind("click",function(){return C(G,H,H.rev?1:-1)})}if(H.timeout){this.cycleTimeout=setTimeout(function(){B(G,H,0,!H.rev)},H.timeout+(H.delay||0))}})};function B(J,E,I,K){if(E.busy){return}var H=J[0].parentNode,M=J[E.currSlide],L=J[E.nextSlide];if(H.cycleTimeout===0&&!I){return}if(I||!H.cyclePause){if(E.before.length){D.each(E.before,function(N,O){O.apply(L,[M,L,E,K])})}var F=function(){if(D.browser.msie){this.style.removeAttribute("filter")}D.each(E.after,function(N,O){O.apply(L,[M,L,E,K])})};if(E.nextSlide!=E.currSlide){E.busy=1;D.fn.cycle.custom(M,L,E,F)}var G=(E.nextSlide+1)==J.length;E.nextSlide=G?0:E.nextSlide+1;E.currSlide=G?J.length-1:E.nextSlide-1}if(E.timeout){H.cycleTimeout=setTimeout(function(){B(J,E,0,!E.rev)},E.timeout)}}function C(E,F,I){var H=E[0].parentNode,G=H.cycleTimeout;if(G){clearTimeout(G);H.cycleTimeout=0}F.nextSlide=F.currSlide+I;if(F.nextSlide<0){F.nextSlide=E.length-1}else{if(F.nextSlide>=E.length){F.nextSlide=0}}B(E,F,1,I>=0);return false}D.fn.cycle.custom=function(K,H,I,E){var J=D(K),G=D(H);G.css({opacity:0});var F=function(){G.animate({opacity:1},I.speedIn,I.easeIn,E)};J.animate({opacity:0},I.speedOut,I.easeOut,function(){J.css({display:"none"});if(!I.sync){F()}});if(I.sync){F()}};D.fn.cycle.transitions={fade:function(F,G,E){G.not(":eq(0)").css("opacity",0);E.before.push(function(){D(this).show()})}};D.fn.cycle.ver=function(){return A};D.fn.cycle.defaults={timeout:4000,speed:1000,next:null,prev:null,before:null,after:null,height:"auto",sync:1,fit:0,pause:0,delay:0,slideExpr:null}})(jQuery)
$(function(){
$('#box2').cycle();});
var DNN_COL_DELIMITER=String.fromCharCode(16);
var DNN_ROW_DELIMITER=String.fromCharCode(15);
var __dnn_m_bPageLoaded=false;
window.onload=__dnn_Page_OnLoad;
function __dnn_ClientAPIEnabled()
{
return typeof(dnn)!='undefined';}
function __dnn_Page_OnLoad()
{
if(__dnn_ClientAPIEnabled())
{
var sLoadHandlers=dnn.getVar('__dnn_pageload');
if(sLoadHandlers!=null)
eval(sLoadHandlers);
dnn.dom.attachEvent(window,'onscroll',__dnn_bodyscroll);}
__dnn_m_bPageLoaded=true;}
function __dnn_KeyDown(iKeyCode,sFunc,e)
{
if(e==null)
e=window.event;
if(e.keyCode==iKeyCode)
{
eval(unescape(sFunc));
return false;}}
function __dnn_bodyscroll()
{
var oF=document.forms[0];
if(__dnn_ClientAPIEnabled()&&__dnn_m_bPageLoaded)
oF.ScrollTop.value=document.documentElement.scrollTop?document.documentElement.scrollTop:dnn.dom.getByTagName("body")[0].scrollTop;}
function __dnn_setScrollTop(iTop)
{
if(__dnn_ClientAPIEnabled())
{
if(iTop==null)
iTop=document.forms[0].ScrollTop.value;
var sID=dnn.getVar('ScrollToControl');
if(sID!=null&&sID.length>0)
{
var oCtl=dnn.dom.getById(sID);
if(oCtl!=null)
{
iTop=dnn.dom.positioning.elementTop(oCtl);
dnn.setVar('ScrollToControl','');}}
window.scrollTo(0,iTop);}}
function __dnn_SetInitialFocus(sID)
{
var oCtl=dnn.dom.getById(sID);
if(oCtl!=null&&__dnn_CanReceiveFocus(oCtl))
oCtl.focus();}
function __dnn_CanReceiveFocus(e)
{
if(e.style.display!='none'&&e.tabIndex>-1&&e.disabled==false&&e.style.visible!='hidden')
{
var eParent=e.parentElement;
while(eParent!=null&&eParent.tagName!='BODY')
{
if(eParent.style.display=='none'||eParent.disabled||eParent.style.visible=='hidden')
return false;
eParent=eParent.parentElement;}
return true;}
else
return false;}
function __dnn_ContainerMaxMin_OnClick(oLnk,sContentID)
{
var oContent=dnn.dom.getById(sContentID);
if(oContent!=null)
{
var oBtn=oLnk.childNodes[0];
var sContainerID=dnn.getVar('containerid_'+ sContentID);
var sCookieID=dnn.getVar('cookieid_'+ sContentID);
var sCurrentFile=oBtn.src.toLowerCase().substr(oBtn.src.lastIndexOf('/'));
var sMaxFile;
var sMaxIcon;
var sMinIcon;
if(dnn.getVar('min_icon_'+ sContainerID))
sMinIcon=dnn.getVar('min_icon_'+ sContainerID);
else
sMinIcon=dnn.getVar('min_icon');
if(dnn.getVar('max_icon_'+ sContainerID))
sMaxIcon=dnn.getVar('max_icon_'+ sContainerID);
else
sMaxIcon=dnn.getVar('max_icon');
sMaxFile=sMaxIcon.toLowerCase().substr(sMaxIcon.lastIndexOf('/'));
var iNum=5;
var animf=dnn.getVar('animf_'+ sContentID);
if(animf!=null)
iNum=new Number(animf);
if(sCurrentFile==sMaxFile)
{
oBtn.src=sMinIcon;
dnn.dom.expandElement(oContent,iNum);
oBtn.title=dnn.getVar('min_text');
if(sCookieID!=null)
{
if(dnn.getVar('__dnn_'+ sContainerID +':defminimized')=='true')
dnn.dom.setCookie(sCookieID,'true',365);
else
dnn.dom.deleteCookie(sCookieID);}
else
dnn.setVar('__dnn_'+ sContainerID +'_Visible','true');}
else
{
oBtn.src=sMaxIcon;
dnn.dom.collapseElement(oContent,iNum);
oBtn.title=dnn.getVar('max_text');
if(sCookieID!=null)
{
if(dnn.getVar('__dnn_'+ sContainerID +':defminimized')=='true')
dnn.dom.deleteCookie(sCookieID);
else
dnn.dom.setCookie(sCookieID,'false',365);}
else
dnn.setVar('__dnn_'+ sContainerID +'_Visible','false');}
return true;}
return false;}
function __dnn_Help_OnClick(sHelpID)
{
var oHelp=dnn.dom.getById(sHelpID);
if(oHelp!=null)
{
if(oHelp.style.display=='none')
oHelp.style.display='';
else
oHelp.style.display='none';
return true;}
return false;}
function __dnn_SectionMaxMin(oBtn,sContentID)
{
var oContent=dnn.dom.getById(sContentID);
if(oContent!=null)
{
var sMaxIcon=oBtn.getAttribute('max_icon');
var sMinIcon=oBtn.getAttribute('min_icon');
var bCallback=oBtn.getAttribute('userctr')!=null;
var sVal;
if(oContent.style.display=='none')
{
oBtn.src=sMinIcon;
oContent.style.display='';
if(bCallback)
sVal='True';
else
dnn.setVar(oBtn.id +':exp',1);}
else
{
oBtn.src=sMaxIcon;
oContent.style.display='none';
if(bCallback)
sVal='False';
else
dnn.setVar(oBtn.id +':exp',0);}
if(bCallback)
dnncore.setUserProp(oBtn.getAttribute('userctr'),oBtn.getAttribute('userkey'),sVal,null);
return true;}
return false;}
function __dnn_enableDragDrop()
{
var aryConts=dnn.getVar('__dnn_dragDrop').split(";");
var aryTitles;
for(var i=0;i<aryConts.length;i++)
{
aryTitles=aryConts[i].split(" ");
if(aryTitles[0].length>0)
{
var oCtr=dnn.dom.getById(aryTitles[0]);
var oTitle=dnn.dom.getById(aryTitles[1]);
if(oCtr!=null&&oTitle!=null)
{
oCtr.setAttribute('moduleid',aryTitles[2]);
dnn.dom.positioning.enableDragAndDrop(oCtr,oTitle,'__dnn_dragComplete()','__dnn_dragOver()');}}}}
var __dnn_oPrevSelPane;
var __dnn_oPrevSelModule;
var __dnn_dragEventCount=0;
function __dnn_dragOver()
{
__dnn_dragEventCount++;
if(__dnn_dragEventCount%75!=0)
return;
var oCont=dnn.dom.getById(dnn.dom.positioning.dragCtr.contID);
var oPane=__dnn_getMostSelectedPane(dnn.dom.positioning.dragCtr);
if(__dnn_oPrevSelPane!=null)
__dnn_oPrevSelPane.pane.style.border=__dnn_oPrevSelPane.origBorder;
if(oPane!=null)
{
__dnn_oPrevSelPane=oPane;
oPane.pane.style.border='4px double '+ DNN_HIGHLIGHT_COLOR;
var iIndex=__dnn_getPaneControlIndex(oCont,oPane);
var oPrevCtl;
var oNextCtl;
for(var i=0;i<oPane.controls.length;i++)
{
if(iIndex>i&&oPane.controls[i].id!=oCont.id)
oPrevCtl=oPane.controls[i];
if(iIndex<=i&&oPane.controls[i].id!=oCont.id)
{
oNextCtl=oPane.controls[i];
break;}}
if(__dnn_oPrevSelModule!=null)
dnn.dom.getNonTextNode(__dnn_oPrevSelModule.control).style.border=__dnn_oPrevSelModule.origBorder;
if(oNextCtl!=null)
{
__dnn_oPrevSelModule=oNextCtl;
dnn.dom.getNonTextNode(oNextCtl.control).style.borderTop='5px groove '+ DNN_HIGHLIGHT_COLOR;}
else if(oPrevCtl!=null)
{
__dnn_oPrevSelModule=oPrevCtl;
dnn.dom.getNonTextNode(oPrevCtl.control).style.borderBottom='5px groove '+ DNN_HIGHLIGHT_COLOR;}}}
function __dnn_dragComplete()
{
var oCtl=dnn.dom.getById(dnn.dom.positioning.dragCtr.contID);
var sModuleID=oCtl.getAttribute('moduleid');
if(__dnn_oPrevSelPane!=null)
__dnn_oPrevSelPane.pane.style.border=__dnn_oPrevSelPane.origBorder;
if(__dnn_oPrevSelModule!=null)
dnn.dom.getNonTextNode(__dnn_oPrevSelModule.control).style.border=__dnn_oPrevSelModule.origBorder;
var oPane=__dnn_getMostSelectedPane(dnn.dom.positioning.dragCtr);
var iIndex;
if(oPane==null)
{
var oPanes=__dnn_Panes();
for(var i=0;i<oPanes.length;i++)
{
if(oPanes[i].id==oCtl.parentNode.id)
oPane=oPanes[i];}}
if(oPane!=null)
{
iIndex=__dnn_getPaneControlIndex(oCtl,oPane);
__dnn_MoveToPane(oPane,oCtl,iIndex);
dnn.callPostBack('MoveToPane','moduleid='+ sModuleID,'pane='+ oPane.paneName,'order='+ iIndex*2);}}
function __dnn_MoveToPane(oPane,oCtl,iIndex)
{
if(oPane!=null)
{
var aryCtls=new Array();
for(var i=iIndex;i<oPane.controls.length;i++)
{
if(oPane.controls[i].control.id!=oCtl.id)
aryCtls[aryCtls.length]=oPane.controls[i].control;
dnn.dom.removeChild(oPane.controls[i].control);}
dnn.dom.appendChild(oPane.pane,oCtl);
oCtl.style.top=0;
oCtl.style.left=0;
oCtl.style.position='relative';
for(var i=0;i<aryCtls.length;i++)
{
dnn.dom.appendChild(oPane.pane,aryCtls[i]);}
__dnn_RefreshPanes();}
else
{
oCtl.style.top=0;
oCtl.style.left=0;
oCtl.style.position='relative';}}
function __dnn_RefreshPanes()
{
var aryPanes=dnn.getVar('__dnn_Panes').split(';');
var aryPaneNames=dnn.getVar('__dnn_PaneNames').split(';');
__dnn_m_aryPanes=new Array();
for(var i=0;i<aryPanes.length;i++)
{
if(aryPanes[i].length>0)
__dnn_m_aryPanes[__dnn_m_aryPanes.length]=new __dnn_Pane(dnn.dom.getById(aryPanes[i]),aryPaneNames[i]);}}
var __dnn_m_aryPanes;
var __dnn_m_aryModules;
function __dnn_Panes()
{
if(__dnn_m_aryPanes==null)
{
__dnn_m_aryPanes=new Array();
__dnn_RefreshPanes();}
return __dnn_m_aryPanes;}
function __dnn_Modules(sModuleID)
{
if(__dnn_m_aryModules==null)
__dnn_RefreshPanes();
return __dnn_m_aryModules[sModuleID];}
function __dnn_getMostSelectedPane(oContent)
{
var oCDims=new dnn.dom.positioning.dims(oContent);
var iTopScore=0;
var iScore;
var oTopPane;
for(var i=0;i<__dnn_Panes().length;i++)
{
var oPane=__dnn_Panes()[i];
var oPDims=new dnn.dom.positioning.dims(oPane.pane);
iScore=dnn.dom.positioning.elementOverlapScore(oPDims,oCDims);
if(iScore>iTopScore)
{
iTopScore=iScore;
oTopPane=oPane;}}
return oTopPane;}
function __dnn_getPaneControlIndex(oContent,oPane)
{
if(oPane==null)
return;
var oCDims=new dnn.dom.positioning.dims(oContent);
var oCtl;
if(oPane.controls.length==0)
return 0;
for(var i=0;i<oPane.controls.length;i++)
{
oCtl=oPane.controls[i];
var oIDims=new dnn.dom.positioning.dims(oCtl.control);
if(oCDims.t<oIDims.t)
return oCtl.index;}
if(oCtl!=null)
return oCtl.index+1;
else
return 0;}
function __dnn_Pane(ctl,sPaneName)
{
this.pane=ctl;
this.id=ctl.id;
this.controls=new Array();
this.origBorder=ctl.style.border;
this.paneName=sPaneName;
var iIndex=0;
var strModuleOrder='';
for(var i=0;i<ctl.childNodes.length;i++)
{
var oNode=ctl.childNodes[i];
if(dnn.dom.isNonTextNode(oNode))
{
if(__dnn_m_aryModules==null)
__dnn_m_aryModules=new Array();
var sModuleID=oNode.getAttribute('moduleid');
if(sModuleID!=null&&sModuleID.length>0)
{
strModuleOrder +=sModuleID +'~';
this.controls[this.controls.length]=new __dnn_PaneControl(oNode,iIndex);
__dnn_m_aryModules[sModuleID]=oNode.id;
iIndex+=1;}}}
this.moduleOrder=strModuleOrder;}
function __dnn_PaneControl(ctl,iIndex)
{
this.control=ctl;
this.id=ctl.id;
this.index=iIndex;
this.origBorder=ctl.style.border;}
function __dnncore()
{
this.GetUserVal=0;
this.SetUserVal=1;}
__dnncore.prototype={
getUserProp:function(sNameCtr,sKey,pFunc){
this._doUserCallBack(dnncore.GetUserVal,sNameCtr,sKey,null,new dnncore.UserPropArgs(sNameCtr,sKey,pFunc));},
setUserProp:function(sNameCtr,sKey,sVal,pFunc){
this._doUserCallBack(dnncore.SetUserVal,sNameCtr,sKey,sVal,new dnncore.UserPropArgs(sNameCtr,sKey,pFunc));},
_doUserCallBack:function(iType,sNameCtr,sKey,sVal,pFunc){
if(dnn&&dnn.xmlhttp)
{
var sPack=iType + COL_DELIMITER + sNameCtr + COL_DELIMITER + sKey + COL_DELIMITER + sVal;
dnn.xmlhttp.doCallBack('__Page',sPack,dnncore._callBackSuccess,pFunc,dnncore._callBackFail,null,true,null,0);}
else
alert('Client Personalization not enabled');},
_callBackSuccess:function(result,ctx,req){
if(ctx.pFunc)
ctx.pFunc(ctx.namingCtr,ctx.key,result);},
_callBackFail:function(result,ctx){
window.status=result;}}
__dnncore.prototype.UserPropArgs=function(sNameCtr,sKey,pFunc)
{
this.namingCtr=sNameCtr;
this.key=sKey;
this.pFunc=pFunc;}
var dnncore=new __dnncore(); 


