var startInput=null;var ajaxCall=false;function ajaxQuickMenu(vars){if(!ajaxCall){ajaxCall=true;xajax_buildTicketsContent(vars);}}
function loadImage(mId,mSrc){document.getElementById(mId).src=mSrc;}
function showObject(name){if(!ajaxCall){obj=document.getElementById(name);if(obj){obj.style.display="inline";}}}
function focusInput(obj){if(startInput==null){startInput=obj.value;}
if(obj.value==startInput){obj.value='';}}
function blurInput(obj){if(obj.value==''){obj.value=startInput;}}
function goSearch(formulier){var searchStr=document.getElementById('search_input');if(searchStr){searchStr=searchStr.value;searchStr=searchStr.replace("/","");if(searchStr.length>0){document.location.href=formulier.action+'?q='+searchStr;}
else{return false;}}
return false;}
function dateChanged(calendar){var url='/services/quickCalendarGet';if(calendar.dateClicked){var y=calendar.date.getFullYear();var m=calendar.date.getMonth();var d=calendar.date.getDate();var params1='year='+y+'&';var params2='module=quickCalendar&'
var params3='month='+m+'&';var params4='day='+d;$.getScript(url+'?'+params1+params2+params3+params4);}
else{da=new Date(document.lastModified);dy=da.getFullYear();dm=da.getMonth();dd=da.getDate();var params1='year='+dy+'&';var params2='module=quickCalendar&'
var params3='month='+dm+'&';var params4='day='+dd;$.getScript(url+'?'+params1+params2+params3+params4);}}
function quickSearchGet(module,moduleId,destinationId){var url='/services/quickSearchGet';if(moduleId.length>0&&module.length>0){var params1='module_id='+moduleId+'&';var params2='module='+module;$.ajax({type:"get",url:url,data:params1+params2,success:function(msg){$("#"+destinationId).html(msg);}});}}
function hoverTicket(obj,highlight){var objClass;if(highlight){objClass='hoverItem';}
else{objClass='';}
if(obj){var currentClass=obj.className;if(currentClass.indexOf('highlight')){objClass='highlight '+objClass;}
obj.className=objClass;}}
function wishlistSelect(selectObj){if(selectObj.value){document.location.href=selectObj.value;}}
function bookmark(bookmarktitel){if(bookmarktitel==''||bookmarktitel==undefined){bookmarktitel=document.title;}
var bookmarklink=document.location.href;if(document.all){window.external.AddFavorite(bookmarklink,bookmarktitel);}
else{window.sidebar.addPanel(bookmarktitel,bookmarklink,"");}}
function toggleReviewPage(showReviews){var reviewResultsObj=document.getElementById('reviewResults');var reviewWriteObj=document.getElementById('reviewWrite');if(reviewResultsObj&&reviewWriteObj){if(showReviews){reviewResultsObj.style.display='';reviewWriteObj.style.display='none';}
else{reviewResultsObj.style.display='none';reviewWriteObj.style.display='';}}
return false;}
function hoverInfo(id,visible){var obj=document.getElementById(id);if(obj){if(visible){obj.style.display="";}
else{obj.style.display="none";}}}
function duplicateTextField(fieldName){fieldIdName=fieldName.replace("[","");fieldIdName=fieldIdName.replace("]","");totalInputs=document.getElementsByName(fieldName).length;fieldId=fieldIdName+'_'+totalInputs;inputText='<br /><input type="text" class="text" id="'+fieldId+'" name="'+fieldName+'" />';$("#emailToMore").append(inputText);document.getElementById(fieldId).focus();}
var popUpWin;function openCentered(documentSrc,windowWidth,windowHeight,scrBars,res){var resizable=(res!=null)?res:0;if(popUpWin){if(!popUpWin.closed)popUpWin.close();}
windowLeft=(window.screen.width-windowWidth)>>1;windowTop=(window.screen.height-windowHeight)>>1;popUpWin=window.open(documentSrc,'','toolbar=0,channelmode=0,location=0,menubar=0,resizable='+resizable+',status=0,scrollbars='+scrBars+',width='+windowWidth+',height='+windowHeight+',left='+windowLeft+',top='+windowTop);popUpWin.focus();return popUpWin;}
function updateStars(elementId,inputId){stars=elementId.innerHTML;width=stars*20;document.getElementById('current-rating').style.width=width+'px';document.getElementById(inputId).value=stars;document.getElementById('rating-clicked').value=1;}
function toggleCal(id){var moreLabel=document.getElementById("calMoreLabel"+id);var lessLabel=document.getElementById("calLessLabel"+id);var content=document.getElementById("calContent"+id);if(content.style.display=='none'){content.style.display='block';moreLabel.style.display='none';lessLabel.style.display='block';}
else{content.style.display='none';moreLabel.style.display='block';lessLabel.style.display='none';}}
function toggleMailafriend(){$("#mailafriend").slideToggle("slow");}
$(document).ready(function(){$("#mailafriendTrigger").click(function(){toggleMailafriend();});$("#mailafriendTrigger2").click(function(){toggleMailafriend();});});var END_OF_INPUT=-1;var base64Chars=new Array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','+','/');var reverseBase64Chars=new Array();for(var i=0;i<base64Chars.length;i++){reverseBase64Chars[base64Chars[i]]=i;}
var base64Str;var base64Count;function setBase64Str(str){base64Str=str;base64Count=0;}
function readBase64(){if(!base64Str)return END_OF_INPUT;if(base64Count>=base64Str.length)return END_OF_INPUT;var c=base64Str.charCodeAt(base64Count)&0xff;base64Count++;return c;}
function base64_encode(str){str=''+str;setBase64Str(str);var result='';var inBuffer=new Array(3);var lineCount=0;var done=false;while(!done&&(inBuffer[0]=readBase64())!=END_OF_INPUT){inBuffer[1]=readBase64();inBuffer[2]=readBase64();result+=(base64Chars[inBuffer[0]>>2]);if(inBuffer[1]!=END_OF_INPUT){result+=(base64Chars[((inBuffer[0]<<4)&0x30)|(inBuffer[1]>>4)]);if(inBuffer[2]!=END_OF_INPUT){result+=(base64Chars[((inBuffer[1]<<2)&0x3c)|(inBuffer[2]>>6)]);result+=(base64Chars[inBuffer[2]&0x3F]);}else{result+=(base64Chars[((inBuffer[1]<<2)&0x3c)]);result+=('=');done=true;}}else{result+=(base64Chars[((inBuffer[0]<<4)&0x30)]);result+=('=');result+=('=');done=true;}
lineCount+=4;if(lineCount>=76){result+=('\n');lineCount=0;}}
return result;}
function readReverseBase64(){if(!base64Str)return END_OF_INPUT;while(true){if(base64Count>=base64Str.length)return END_OF_INPUT;var nextCharacter=base64Str.charAt(base64Count);base64Count++;if(reverseBase64Chars[nextCharacter]){return reverseBase64Chars[nextCharacter];}
if(nextCharacter=='A')return 0;}
return END_OF_INPUT;}
function ntos(n){n=n.toString(16);if(n.length==1)n="0"+n;n="%"+n;return unescape(n);}
function base64_decode(str){setBase64Str(str);var result="";var inBuffer=new Array(4);var done=false;while(!done&&(inBuffer[0]=readReverseBase64())!=END_OF_INPUT&&(inBuffer[1]=readReverseBase64())!=END_OF_INPUT){inBuffer[2]=readReverseBase64();inBuffer[3]=readReverseBase64();result+=ntos((((inBuffer[0]<<2)&0xff)|inBuffer[1]>>4));if(inBuffer[2]!=END_OF_INPUT){result+=ntos((((inBuffer[1]<<4)&0xff)|inBuffer[2]>>2));if(inBuffer[3]!=END_OF_INPUT){result+=ntos((((inBuffer[2]<<6)&0xff)|inBuffer[3]));}else{done=true;}}else{done=true;}}
return result;};(function($){$.facebox=function(data,klass){$.facebox.loading()
if(data.ajax)fillFaceboxFromAjax(data.ajax)
else if(data.image)fillFaceboxFromImage(data.image)
else if(data.div)fillFaceboxFromHref(data.div)
else if($.isFunction(data))data.call($)
else $.facebox.reveal(data,klass)}
$.extend($.facebox,{settings:{opacity:0,overlay:true,loadingImage:'/img/facebox/loading.gif',closeImage:'/img/facebox/closelabel.gif',imageTypes:['png','jpg','jpeg','gif'],faceboxHtml:'\
    <div id="facebox" style="display:none;"> \
      <div class="popup"> \
        <table> \
          <tbody> \
            <tr> \
              <td class="tl"/><td class="b"/><td class="tr"/> \
            </tr> \
            <tr> \
              <td class="b"/> \
              <td class="body"> \
                <div class="content"> \
                </div> \
                <div class="footer"> \
                  <a href="#" class="close"> \
                    <img src="/img/facebox/closelabel.gif" title="close" class="close_image" /> \
                  </a> \
                </div> \
              </td> \
              <td class="b"/> \
            </tr> \
            <tr> \
              <td class="bl"/><td class="b"/><td class="br"/> \
            </tr> \
          </tbody> \
        </table> \
      </div> \
    </div>'},loading:function(){init()
if($('#facebox .loading').length==1)return true
showOverlay()
$('#facebox .content').empty()
$('#facebox .body').children().hide().end().append('<div class="loading"><img src="'+$.facebox.settings.loadingImage+'"/></div>')
$('#facebox').css({top:getPageScroll()[1],left:0}).show()
$(document).bind('keydown.facebox',function(e){if(e.keyCode==27)$.facebox.close()
return true})
$(document).trigger('loading.facebox')},reveal:function(data,klass){$(document).trigger('beforeReveal.facebox')
if(klass)$('#facebox .content').addClass(klass)
$('#facebox .content').append(data)
$('#facebox .loading').remove()
$('#facebox .body').children().fadeIn('normal')
$('#facebox').css('left',0)
$(document).trigger('reveal.facebox').trigger('afterReveal.facebox')},close:function(){$(document).trigger('close.facebox')
return false}})
$.fn.facebox=function(settings){init(settings)
function clickHandler(){$.facebox.loading(true)
var klass=this.rel.match(/facebox\[?\.(\w+)\]?/)
if(klass)klass=klass[1]
fillFaceboxFromHref(this.href,klass)
return false}
return this.click(clickHandler)}
function init(settings){if($.facebox.settings.inited)return true
else $.facebox.settings.inited=true
$(document).trigger('init.facebox')
makeCompatible()
var imageTypes=$.facebox.settings.imageTypes.join('|')
$.facebox.settings.imageTypesRegexp=new RegExp('\.'+imageTypes+'$','i')
if(settings)$.extend($.facebox.settings,settings)
$('body').append($.facebox.settings.faceboxHtml)
var preload=[new Image(),new Image()]
preload[0].src=$.facebox.settings.closeImage
preload[1].src=$.facebox.settings.loadingImage
$('#facebox').find('.b:first, .bl, .br, .tl, .tr').each(function(){preload.push(new Image())
preload.slice(-1).src=$(this).css('background-image').replace(/url\((.+)\)/,'$1')})
$('#facebox .close').click($.facebox.close)
$('#facebox .close_image').attr('src',$.facebox.settings.closeImage)}
function getPageScroll(){var xScroll,yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;xScroll=self.pageXOffset;}else if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;xScroll=document.documentElement.scrollLeft;}else if(document.body){yScroll=document.body.scrollTop;xScroll=document.body.scrollLeft;}
return new Array(xScroll,yScroll)}
function getPageHeight(){var windowHeight
if(self.innerHeight){windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowHeight=document.documentElement.clientHeight;}else if(document.body){windowHeight=document.body.clientHeight;}
return windowHeight}
function makeCompatible(){var $s=$.facebox.settings
$s.loadingImage=$s.loading_image||$s.loadingImage
$s.closeImage=$s.close_image||$s.closeImage
$s.imageTypes=$s.image_types||$s.imageTypes
$s.faceboxHtml=$s.facebox_html||$s.faceboxHtml}
function fillFaceboxFromHref(href,klass){if(href.match(/#/)){var url=window.location.href.split('#')[0]
var target=href.replace(url,'')
$.facebox.reveal($(target).clone().show(),klass)}else if(href.match($.facebox.settings.imageTypesRegexp)){fillFaceboxFromImage(href,klass)}else{fillFaceboxFromAjax(href,klass)}}
function fillFaceboxFromImage(href,klass){var image=new Image()
image.onload=function(){$.facebox.reveal('<div class="image"><img src="'+image.src+'" /></div>',klass)}
image.src=href}
function fillFaceboxFromAjax(href,klass){$.get(href,function(data){$.facebox.reveal(data,klass)})}
function skipOverlay(){return $.facebox.settings.overlay==false||$.facebox.settings.opacity===null}
function showOverlay(){if(skipOverlay())return
if($('facebox_overlay').length==0)
$("body").append('<div id="facebox_overlay" class="facebox_hide"></div>')
$('#facebox_overlay').hide().addClass("facebox_overlayBG").css('opacity',$.facebox.settings.opacity).click(function(){$(document).trigger('close.facebox')}).fadeIn(200)
return false}
function hideOverlay(){if(skipOverlay())return
$('#facebox_overlay').fadeOut(200,function(){$("#facebox_overlay").removeClass("facebox_overlayBG")
$("#facebox_overlay").addClass("facebox_hide")
$("#facebox_overlay").remove()})
return false}
$(document).bind('close.facebox',function(){$(document).unbind('keydown.facebox')
$('#facebox').fadeOut(function(){$('#facebox .content').removeClass().addClass('content')
hideOverlay()
$('#facebox .loading').remove()})})})(jQuery);;var Drag={obj:null,init:function(o,oRoot,minX,maxX,minY,maxY,bSwapHorzRef,bSwapVertRef,fXMapper,fYMapper)
{o.onmousedown=Drag.start;o.hmode=bSwapHorzRef?false:true;o.vmode=bSwapVertRef?false:true;o.root=oRoot&&oRoot!=null?oRoot:o;if(o.hmode&&isNaN(parseInt(o.root.style.left)))o.root.style.left="0px";if(o.vmode&&isNaN(parseInt(o.root.style.top)))o.root.style.top="0px";if(!o.hmode&&isNaN(parseInt(o.root.style.right)))o.root.style.right="0px";if(!o.vmode&&isNaN(parseInt(o.root.style.bottom)))o.root.style.bottom="0px";o.minX=typeof minX!='undefined'?minX:null;o.minY=typeof minY!='undefined'?minY:null;o.maxX=typeof maxX!='undefined'?maxX:null;o.maxY=typeof maxY!='undefined'?maxY:null;o.xMapper=fXMapper?fXMapper:null;o.yMapper=fYMapper?fYMapper:null;o.root.onDragStart=new Function();o.root.onDragEnd=new Function();o.root.onDrag=new Function();},start:function(e)
{var o=Drag.obj=this;e=Drag.fixE(e);var y=parseInt(o.vmode?o.root.style.top:o.root.style.bottom);var x=parseInt(o.hmode?o.root.style.left:o.root.style.right);o.root.onDragStart(x,y);o.lastMouseX=e.clientX;o.lastMouseY=e.clientY;if(o.hmode){if(o.minX!=null)o.minMouseX=e.clientX-x+o.minX;if(o.maxX!=null)o.maxMouseX=o.minMouseX+o.maxX-o.minX;}else{if(o.minX!=null)o.maxMouseX=-o.minX+e.clientX+x;if(o.maxX!=null)o.minMouseX=-o.maxX+e.clientX+x;}
if(o.vmode){if(o.minY!=null)o.minMouseY=e.clientY-y+o.minY;if(o.maxY!=null)o.maxMouseY=o.minMouseY+o.maxY-o.minY;}else{if(o.minY!=null)o.maxMouseY=-o.minY+e.clientY+y;if(o.maxY!=null)o.minMouseY=-o.maxY+e.clientY+y;}
document.onmousemove=Drag.drag;document.onmouseup=Drag.end;return false;},drag:function(e)
{e=Drag.fixE(e);var o=Drag.obj;var ey=e.clientY;var ex=e.clientX;var y=parseInt(o.vmode?o.root.style.top:o.root.style.bottom);var x=parseInt(o.hmode?o.root.style.left:o.root.style.right);var nx,ny;if(o.minX!=null)ex=o.hmode?Math.max(ex,o.minMouseX):Math.min(ex,o.maxMouseX);if(o.maxX!=null)ex=o.hmode?Math.min(ex,o.maxMouseX):Math.max(ex,o.minMouseX);if(o.minY!=null)ey=o.vmode?Math.max(ey,o.minMouseY):Math.min(ey,o.maxMouseY);if(o.maxY!=null)ey=o.vmode?Math.min(ey,o.maxMouseY):Math.max(ey,o.minMouseY);nx=x+((ex-o.lastMouseX)*(o.hmode?1:-1));ny=y+((ey-o.lastMouseY)*(o.vmode?1:-1));if(o.xMapper)nx=o.xMapper(y)
else if(o.yMapper)ny=o.yMapper(x)
Drag.obj.root.style[o.hmode?"left":"right"]=nx+"px";Drag.obj.root.style[o.vmode?"top":"bottom"]=ny+"px";Drag.obj.lastMouseX=ex;Drag.obj.lastMouseY=ey;Drag.obj.root.onDrag(nx,ny);return false;},end:function()
{document.onmousemove=null;document.onmouseup=null;Drag.obj.root.onDragEnd(parseInt(Drag.obj.root.style[Drag.obj.hmode?"left":"right"]),parseInt(Drag.obj.root.style[Drag.obj.vmode?"top":"bottom"]));Drag.obj=null;},fixE:function(e)
{if(typeof e=='undefined')e=window.event;if(typeof e.layerX=='undefined')e.layerX=e.offsetX;if(typeof e.layerY=='undefined')e.layerY=e.offsetY;return e;}};;var strImagePath='/img/popup/';var intPopupCount=0;var intZTop=100;function PopupIframe(strUrl,strTitle,intWidth,intHeight,bolModal)
{var bolCenter=false;PopupInit(strTitle,intWidth,intHeight,bolModal,bolCenter);var objDiv;objDiv=document.createElement('div');objDiv.id='content'+intPopupCount;objDiv.style.position='absolute';objDiv.style.top='22px';objDiv.style.left='0px';objDiv.style.width=(intWidth-4)+'px';objDiv.style.height=(intHeight-24)+'px';objDiv.style.margin='0px';objDiv.style.padding='0px';objDiv.style.color='#000000';objDiv.style.backgroundColor='#fff';document.getElementById('popup'+intPopupCount).appendChild(objDiv);document.getElementById('content'+intPopupCount).innerHTML='<iframe id="popupIframe'+intPopupCount+'" frameborder=0 src="'+strUrl
+'" style="margin : 0px; padding : 0px; width : '+(intWidth-4)+'px; height :'
+(intHeight-24)+'px; background:#fff;" allowTransparency="true"></iframe>';Drag.init(document.getElementById('title'+intPopupCount),document.getElementById('popup'+intPopupCount));}
function PopupMessage(strTitleBase64,strContentBase64,intWidth,intHeight,intTimeOut)
{var bolModal=true;var bolCenter=true;PopupInit(base64_decode(strTitleBase64),intWidth,intHeight,bolModal,bolCenter);var objDiv;objDiv=document.createElement('div');objDiv.id='innerContent'+intPopupCount;objDiv.style.position='absolute';objDiv.style.top='27px';objDiv.style.left='5px';objDiv.style.width=(intWidth-11)+'px';objDiv.style.height=(intHeight-34)+'px';objDiv.style.margin='0px';objDiv.style.padding='0px';objDiv.style.color='#000000';objDiv.style.border='1px solid #ccc';objDiv.style.backgroundColor='#fff';objDiv.innerHTML='<div style="margin : 0px; padding : 10px">'+base64_decode(strContentBase64)+'</div>';document.getElementById('popup'+intPopupCount).appendChild(objDiv);if(intTimeOut>0)setTimeout('PopupDestroyLast()',intTimeOut);}
function PopupDialog(strTitleBase64,strContentBase64,intWidth,intHeight,bolModal,bolShowButtons,strOkJs,strOkTxt,strCancelTxt)
{if(!strOkTxt)strOkTxt='OK';if(!strCancelTxt)strCancelTxt='Cancel';if(!strOkJs)strOkJs='void()';var bolCenter=false;PopupInit(base64_decode(strTitleBase64),intWidth,intHeight,bolModal,bolCenter);var objDiv;objDiv=document.createElement('div');objDiv.id='innerContent'+intPopupCount;objDiv.style.position='absolute';objDiv.style.top='27px';objDiv.style.left='5px';objDiv.style.width=(intWidth-11)+'px';objDiv.style.height=(intHeight-34)+'px';objDiv.style.margin='0px';objDiv.style.padding='0px';objDiv.style.color='#000000';objDiv.style.border='1px solid #ccc';objDiv.style.backgroundColor='#fff';objDiv.style.textAlign='left';objDiv.innerHTML='<div style="margin : 0px; padding : 10px">'+base64_decode(strContentBase64)+'</div>';document.getElementById('popup'+intPopupCount).appendChild(objDiv);if(!bolShowButtons)
{objDiv=document.createElement('div');objDiv.id='Buttons'+intPopupCount;objDiv.style.position='absolute';objDiv.style.bottom='11px';objDiv.style.right='11px';objDiv.style.margin='0px';objDiv.style.padding='0px';objDiv.innerHTML='<input class=button type=button OnClick="'+strOkJs+'" value="'+strOkTxt+'">'+'<input class=button type=button OnClick="PopupDestroyLast()" value="'+strCancelTxt+'">';document.getElementById('popup'+intPopupCount).appendChild(objDiv);}
Drag.init(document.getElementById('title'+intPopupCount),document.getElementById('popup'+intPopupCount));}
function GetUnQuotedFormAjax(strId)
{return xajax.getFormValues(strId).replace("'",'`');}
function PopupAjax(strTitleBase64,strContentBase64,intWidth,intHeight,strOkFunction,strOkTxtBase64,strCancelTxtBase64)
{if(!strOkTxtBase64)strOkTxt='OK';else strOkTxt=base64_decode(strOkTxtBase64);if(!strCancelTxtBase64)strCancelTxt='Cancel';else strCancelTxt=base64_decode(strCancelTxtBase64);var bolModal=true;var bolCenter=false;PopupInit(base64_decode(strTitleBase64),intWidth,intHeight,bolModal,bolCenter);var objDiv;objDiv=document.createElement('div');objDiv.id='innerContent'+intPopupCount;objDiv.style.position='absolute';objDiv.style.top='27px';objDiv.style.left='5px';objDiv.style.width=(intWidth-11)+'px';objDiv.style.height=(intHeight-34)+'px';objDiv.style.margin='0px';objDiv.style.padding='0px';objDiv.style.color='#000000';objDiv.style.border='1px solid #ccc';objDiv.style.backgroundColor='#fff';objDiv.style.zIndex=intPopupCount*1000+intZTop+1;objDiv.innerHTML='<div style="padding : 0px; margin : 5px;"><form id="popupform'+intPopupCount+'">'+base64_decode(strContentBase64)+'</form></div>';document.getElementById('popup'+intPopupCount).appendChild(objDiv);objDiv=document.createElement('div');objDiv.id='Buttons'+intPopupCount;objDiv.style.position='absolute';objDiv.style.bottom='11px';objDiv.style.right='11px';objDiv.style.margin='0px';objDiv.style.padding='0px';objDiv.style.zIndex=intPopupCount*1000+intZTop+2;document.getElementById('popup'+intPopupCount).appendChild(objDiv);var strJs=strOkFunction+"(GetUnQuotedFormAjax('popupform"+intPopupCount+"'))";objDiv.innerHTML='<input class=button type=button OnClick="'+strJs+';" value="'+strOkTxt+'">'+'<input class=button type=button OnClick="PopupDestroyLast()" value="'+strCancelTxt+'">';document.getElementById('popup'+intPopupCount).appendChild(objDiv);Drag.init(document.getElementById('title'+intPopupCount),document.getElementById('popup'+intPopupCount));}
function PopupAlert(strTitleBase64,strContentBase64,strButtonTxtBase64,intWidth,intHeight)
{if(!strButtonTxtBase64)strButtonTxtBase64=base64_encode('OK');if(!intWidth)intWidth=320;if(!intHeight)intHeight=200;var bolModal=true;var bolCenter=false;PopupInit(base64_decode(strTitleBase64),intWidth,intHeight,bolModal,bolCenter);var objDiv;objDiv=document.createElement('div');objDiv.id='innerContent'+intPopupCount;objDiv.style.position='absolute';objDiv.style.top='27px';objDiv.style.left='5px';objDiv.style.width=(intWidth-11)+'px';objDiv.style.height=(intHeight-34)+'px';objDiv.style.margin='0px';objDiv.style.padding='0px';objDiv.style.color='#000000';objDiv.style.border='1px solid #ccc';objDiv.style.backgroundColor='#fff';objDiv.innerHTML='<div style="margin : 0px; padding : 10px">'+base64_decode(strContentBase64)+'</div>';document.getElementById('popup'+intPopupCount).appendChild(objDiv);objDiv=document.createElement('div');objDiv.id='Buttons'+intPopupCount;objDiv.style.position='absolute';objDiv.style.bottom='11px';objDiv.style.right='11px';objDiv.style.margin='0px';objDiv.style.padding='0px';objDiv.innerHTML='<input style="width : 50px;" type=button OnClick="PopupDestroy('+intPopupCount+')" value="'+base64_decode(strButtonTxtBase64)+'">';document.getElementById('popup'+intPopupCount).appendChild(objDiv);Drag.init(document.getElementById('title'+intPopupCount),document.getElementById('popup'+intPopupCount));}
function PopupInit(strTitle,intWidth,intHeight,bolModal,bolCenter)
{if(!intWidth)intWidth=800;if(!intHeight)intHeight=600;intPopupCount++;intX=(document.body.clientWidth/2)-intWidth/2;if(bolCenter){intY=(screen.height/2)-intHeight/2;}else{intY=document.documentElement.scrollTop;}
var objDiv;if(bolModal)
{objDiv=document.createElement('div');objDiv.style.position='absolute';objDiv.style.top='0px';objDiv.style.left='0px';objDiv.style.width=(document.body.clientWidth-20)+'px';objDiv.style.height=(document.body.clientHeight-20)+'px';objDiv.id='modalmask'+intPopupCount;objDiv.style.backgroundImage='url('+strImagePath+'blockback.gif)';objDiv.style.backgroundRepeat='repeat';objDiv.style.visibility='visible';objDiv.style.cursor='not-allowed';objDiv.style.zIndex=intPopupCount*1000+intZTop;document.body.appendChild(objDiv);}
objDiv=document.createElement('div');objDiv.id='popup'+intPopupCount;objDiv.style.position='absolute';objDiv.style.top=intY+(intPopupCount*15)+'px';objDiv.style.left=intX+(intPopupCount*15)+'px';objDiv.style.width=intWidth+'px';objDiv.style.height=intHeight+'px';objDiv.style.backgroundColor='#ece9d8';objDiv.style.backgroundImage='url('+strImagePath+'topbar.gif)';objDiv.style.backgroundRepeat='repeat-x';objDiv.style.borderWidth='0px 2px 2px 2px';objDiv.style.borderStyle='solid';objDiv.style.borderColor='#FD660D';objDiv.style.zIndex=1+intPopupCount*1000+intZTop;document.body.appendChild(objDiv);document.getElementById('popup'+intPopupCount).onclick=popupFocus;objDiv=document.createElement('div');objDiv.id='close'+intPopupCount;objDiv.style.margin='4px 0px 0px 3px';objDiv.style.styleFloat='right';objDiv.style.cssFloat='right';document.getElementById('popup'+intPopupCount).appendChild(objDiv);document.getElementById('close'+intPopupCount).innerHTML="<img src='"+strImagePath+"close.gif' OnClick='PopupDestroy("+intPopupCount+",false);'>";objDiv=document.createElement('div');objDiv.id='title'+intPopupCount;objDiv.style.margin='1px';objDiv.style.cssFloat='left';objDiv.style.fontSize='12px';objDiv.style.fontWeight='bold';objDiv.style.width='90%';objDiv.style.color='#ffffff';objDiv.style.cursor='move';objDiv.style.textAlign='left';document.getElementById('popup'+intPopupCount).appendChild(objDiv);document.getElementById('title'+intPopupCount).innerHTML=unescape(strTitle);document.getElementById('title'+intPopupCount).onclick=popupFocusParent;}
function PopupCreate(strUrl,strTitle,intWidth,intHeight,bolModal)
{return PopupIframe(strUrl,strTitle,intWidth,intHeight,bolModal);}
function PopupDestroy(intId,blnReloadWindow)
{if(objPopup=document.getElementById('popup'+intId))
{setTimeout("document.body.removeChild(document.getElementById('popup"+intId+"'))",1);}
if(objModalMask=document.getElementById('modalmask'+intId))
{setTimeout("document.body.removeChild(document.getElementById('modalmask"+intId+"'))",5);}
intPopupCount--;if(intPopupCount>0)
{if(objDiv=document.getElementById('popupIframe'+intPopupCount))
{objDiv.src=objDiv.src;}}
if(blnReloadWindow==true)
{window.location.reload();}}
function PopupDestroyLast(blnReloadWindow)
{blnReloadWindow=typeof(blnReloadWindow)!='undefined'?blnReloadWindow:false;if(intPopupCount>1&&blnReloadWindow==true)
{PopupDestroy(intPopupCount,false);}
else
{PopupDestroy(intPopupCount,blnReloadWindow);}}
function popupFocus(e)
{var objSrc=(document.all)?event.srcElement:e.target;if(objSrc.style.zIndex<1000)
{objSrc.style.zIndex=intZTop;intZTop++;}}
function popupFocusParent(e)
{var objSrc=(document.all)?event.srcElement:e.target;if(objSrc.parentNode.style.zIndex<1000)
{objSrc.parentNode.style.zIndex=intZTop;intZTop++;}}
function RemoveElement(strId)
{objThisDiv=document.getElementById(strId);strParentId=objThisDiv.parentNode.id;objElement=document.getElementById(strParentId)
objElement.parentNode.removeChild(objThisDiv.name);}