var APIScriptLoader=new Object();APIScriptLoader.Load=function() {};try{window.getOpener=function(){if(window.opener)
return window.opener;if(window.parent&&window.parent.isDialog)
return window.parent.opener;return null;}
var opener=null;if(window.parent&&window.parent.isDialog){window.close=function(){window.parent.close();}
window.opener=window.parent.opener;opener=window.parent.opener;}
else if(window.opener){opener=window.opener;}
else if(parent.dialogArguments){this.opener=parent.dialogArguments;opener=parent.dialogArguments;}}
catch(e){}
function setRelativeHref(href,location){if(!location)
location=window.location;if(href.indexOf("/")===0){location.href=href;}
else if(href.indexOf("http://")===0){location.href=href;}
else{location.href=location.pathname.substring(0,location.pathname.lastIndexOf('/')+1)+href;}}
function FSAttachEvent(targetObject,eventName,eventFunction){if(!targetObject)
return;if(targetObject.attachEvent){targetObject.attachEvent('on'+eventName,eventFunction);}
else{targetObject.addEventListener(eventName,eventFunction,false);}}
function showDown(evt){evt=evt||window.event;if(evt){var target=null;if(evt.originalTarget)
target=evt.originalTarget;else if(evt.relatedTarget)
target=evt.relatedTarget;else if(evt.srcElement)
target=evt.srcElement;else
target=new Object();if(evt.keyCode==8&&(target.type!="text"&&target.type!="textarea"&&target.type!="password"&&!target.contentEditable)){cancelKey(evt);}
else if(evt.keyCode==116){cancelKey(evt);}
else if(evt.ctrlKey&&(evt.keyCode==78||evt.keyCode==82)){cancelKey(evt);}}}
function cancelKey(evt){if(evt.preventDefault){evt.preventDefault();return false;}
else{evt.keyCode=0;evt.returnValue=false;}}
function cancelKeyFCK(evt){evt.cancelBubble=true;}
function disable_user_nav(oDoc){window.history.forward(1);if(!oDoc)
oDoc=document;FSAttachEvent(oDoc,'keydown',showDown);}
function get_base_href(){if(window.document.getElementsByTagName('BASE')){aBase=window.document.getElementsByTagName('BASE');for(i=0;i<aBase.length;i++){if(aBase[i].href)
return aBase[i].href;}}
return'';}
function openChild(hreference,name,width,height,modal,noloading){if(!noloading)
noloading='';if(!width)
width=640;if(!height)
height=540;if(!modal){LeftPosition=(screen.width)?(screen.width-width)/2:0;TopPosition=(screen.height)?(screen.height-height)/2:0;var WinSettings='height='+height+',width='+width+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no,resizable=no,toolbar=no,status=no,alwaysRaised=yes;edge:raised;';return window.top.open(hreference,name,WinSettings);}else{LeftPosition=(screen.width)?(screen.width-width)/2:0;TopPosition=(screen.height)?(screen.height-height)/2:0;var WinSettings="center:yes;resizable:no;dialogWidth:"+width+"px;dialogHeight:"+height+"px;dialogTop:"+TopPosition+"px;dialogLeft:"+LeftPosition+"px;status:no;edge:raised;scroll:0;";return window.showModalDialog(get_base_href()+'dialog.php?noloading='+noloading+'&hreference='+hreference,window,WinSettings);}}
function initArray(){this.length=initArray.arguments.length;for(var i=0;i<this.length;i++)
this[i]=initArray.arguments[i];}
function from10toradix(value,radix){var retval='';var ConvArray=new initArray(0,1,2,3,4,5,6,7,8,9,'A','B','C','D','E','F');var intnum;var tmpnum;var i=0;intnum=parseInt(value,10);if(isNaN(intnum)){retval='NaN';}else{while(intnum>0.9){i++;tmpnum=intnum;retval=ConvArray[tmpnum%radix]+retval;intnum=Math.floor(tmpnum/radix);if(i>100){retval='NaN';break;}}}
return retval;}
function setCookie(NameOfCookie,value,expiredays)
{if(!expiredays)
expiredays=2;var ExpireDate=new Date();ExpireDate.setTime(ExpireDate.getTime()+(expiredays*24*3600*1000));try{myCookie=NameOfCookie+"="+encodeURIComponent(value)+((expiredays==null)?"":";expires="+ExpireDate.toGMTString())+";path=/"+"";document.cookie=myCookie;}
catch(e){alert('Failed to set cookie: '+e.description+' ('+NameOfCookie+')');}}
function getCookie(NameOfCookie)
{if(document.cookie.length>0)
{begin=document.cookie.indexOf(NameOfCookie+"=");if(begin!=-1)
{begin+=NameOfCookie.length+1;end=document.cookie.indexOf(";",begin);if(end==-1)end=document.cookie.length;return decodeURIComponent(document.cookie.substring(begin,end));}}
return null;}
function delCookie(NameOfCookie)
{if(getCookie(NameOfCookie)){document.cookie=NameOfCookie+"="+"; expires=Thu, 01-Jan-70 00:00:01 GMT";}};function debug_popup(messageFunction){var carrier=window.top
if(window.opener)
var carrier=window.opener.top;var ready=false;if(!carrier.debug_window||carrier.debug_window.closed){carrier.debug_window=openChild('','debug',800,600);if(!carrier.debug_window.document.getElementById('debug')){carrier.debug_window=openChild(get_base_href()+'debug.php','debug',800,600);}
function _debug_popup(){if(ready==false&&carrier.debug_window&&!carrier.debug_window.closed){window.setTimeout(function(){try{carrier.debug_window.document.getElementById('debug').innerHTML;ready=true;messageFunction();}
catch(e){_debug_popup();}},100);}}}
_debug_popup();}
function debug_message(message,image,backtrace){var carrier=window.top
if(window.opener)
carrier=window.opener.top;if(!message)
message='No message specified!';if(!image)
image='style/default/images/wnd_ico_notice_small.gif';message='<div style="float:left;clear:left;width:100%;"><img src="'+image+'" align="left"> '+message;if(backtrace){message=message+backtrace;}
message=message+'</div>';try{carrier.debug_window.document.getElementById('debug').innerHTML=carrier.debug_window.document.getElementById('debug').innerHTML+message;carrier.debug_window.document.getElementById('debug').scrollTop=carrier.debug_window.document.getElementById('debug').scrollHeight;}
catch(e){}};var rpc_directory=Array();function rpc(rpcObject,rpcFunction){this.rpcObject=rpcObject;this.rpcFunction=rpcFunction
this.callBack=null;this.completed=false;this.parameter_names=Array();this.parameter_values=Array();this.parameters=0;this.status=null;this.responseText=null;this.responseXML=null;this.execute=function(){if(this.xmlRpc){this.completed=false;this.xmlRpc.open("POST","rpc.php?__object="+this.rpcObject+"&__function="+this.rpcFunction,true);this.xmlRpc.setRequestHeader("Content-type","application/x-www-form-urlencoded");this.xmlRpc.setRequestHeader("Cache-Control","no-cache");this.xmlRpc.setRequestHeader("Connection","close");this.xmlRpc.send(this.parseParameters());return true;}
else
return false;}
this.setParameter=function(name,value){for(i=0;i<this.parameters;i++){if(this.parameter_names[i]==name){this.paramter_names[i]=name;return;}}
this.parameter_names[this.parameters]=name;this.parameter_values[this.parameters]=value;this.parameters++;}
this.getParameter=function(name){for(i=0;i<this.parameters;i++){if(this.parameter_names[i]==name){return this.parameter_values[i];}}
return false;}
this.parseParameters=function(){ret='';for(i=0;i<this.parameters;i++){if(ret!='')
ret=ret+"&";ret=ret+escape(this.parameter_names[i])+"="+escape(this.parameter_values[i]);}
return ret;}
this.collectForm=function(form){for(i=0;i<form.elements.length;i++){if(form.elements[i].name)
this.setParameter(form.elements[i].name,form.elements[i].value);else if(form.elements[i].id)
this.setParameter(form.elements[i].id,form.elements[i].value);}}
this.change=function(){for(i=0;i<rpc_directory.length;i++){try{if(rpc_directory[i])
rpc_directory[i]._change();}
catch(e){alert(e.message);}}}
this._change=function(){if(this.xmlRpc.readyState==4&&this.completed==false){this.status=this.xmlRpc.status;this.responseText=this.xmlRpc.responseText;if(this.xmlRpc.responseXML){this.responseXML=new ActiveXObject("Microsoft.XMLDOM");this.responseXML.async="false";this.responseXML.loadXML(this.responseText);}
else{parser=new DOMParser();this.responseXML=parser.parseFromString(this.responseText,"text/xml");}
if(this.callBack)
this.callBack(this.status,this.responseXML.documentElement,this.responseText);this.completed=true;}}
try{this.xmlRpc=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{this.xmlRpc=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){this.xmlRpc=false;}}
try{if(!this.xmlRpc&&typeof XMLHttpRequest!='undefined'){this.xmlRpc=new XMLHttpRequest();}
this.change=this.xmlRpc.onreadystatechange=this.change;}
catch(e){this.xmlRpc=false;}
rpc_directory.push(this);};var wnd_winW;var wnd_winH;var wnd_step;var wnd_act_id;var wnd_cxt_id=Array();var wnd_top;var wnd_clientx;var wnd_clienty;var wnd_id=null;var wnd_context_menus=Array();function wnd_handler_index_error(){fader=API.faders.New(document.getElementById('system_error'),.2,20,0,100,false);fader.element.style.display='block';fader.fadeIn();slider=API.sliders.New(document.getElementById('system_error_details'),'height',.5,40,0,150);}
function wnd_property_datepicker(id,value,container,bMayBeEmpty){if(!container){document.write('<div class="wndDatePickerContainer" id="'+id+'container"></div>');}
var self=this;this.value=value;if(bMayBeEmpty)
var mayBeEmpty=true;else
var mayBeEmpty=false;if(this.value){var date=new Date(this.value);var currentDate=new Date(this.value);}
else{var date=new Date();var currentDate=null;}
var rangePrev=null;var rangeNext=null;var container=document.getElementById(id+'container');var input=document.createElement('input');var months=["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"];var yearSelect=null;var monthSelect=null;var daySelect=null;input.name=id;input.id=id;input.readOnly=false;input.onchange=function(){var date=this.value.split('/',3);self.setDateValue(parseFloat(date[2]),parseFloat(date[0])-1,parseFloat(date[1]));}
input.value=value;input.datePicker=this;input.className='wndDatePickerInput';var button=document.createElement('div');button.className='wndDatePickerButton';container.appendChild(input);container.appendChild(button);var selectContainer=document.createElement('div');selectContainer.className="wndDatePicker";selectContainer.style.display='none';selectContainer.style.position='absolute';var monthSelection=document.createElement('div');monthSelection.className="wndDatePickerMonthSelection";var monthPrevious=document.createElement('div');monthPrevious.className="wndDatePickerMonthPrevious";var monthLabel=document.createElement('div');monthLabel.className="wndDatePickerMonthLabel";var monthNext=document.createElement('div');monthNext.className="wndDatePickerMonthNext";monthPrevious.onmousedown=function(){this.className='wndDatePickerMonthPreviousDown';}
monthPrevious.onmouseout=function(){this.className='wndDatePickerMonthPrevious';}
monthPrevious.onmouseup=function(e){e=e||window.event;this.className='wndDatePickerMonthPrevious';self.previousMonth();if(e.preventDefault)
e.preventDefault();e.cancelBubble=true;return false;}
monthNext.onmousedown=function(){this.className='wndDatePickerMonthNextDown';}
monthNext.onmouseout=function(){this.className='wndDatePickerMonthNext';}
monthNext.onmouseup=function(e){e=e||window.event;this.className='wndDatePickerMonthNext';self.nextMonth();if(e.preventDefault)
e.preventDefault();e.cancelBubble=true;return false;}
monthSelection.appendChild(monthPrevious);monthSelection.appendChild(monthLabel);monthSelection.appendChild(monthNext);var daySelection=document.createElement('div');daySelection.className="wndDatePickerDaySelection";var dayOverview=document.createElement('div');dayOverview.className="wndDatePickerDayOverview";var days=['S','M','T','W','T','F','S'];for(var i=0;i<days.length;i++){var oDay=document.createElement('div');oDay.innerHTML=days[i];dayOverview.appendChild(oDay);}
daySelection.appendChild(dayOverview);var shown=false;var dayContainer=document.createElement('div');dayContainer.className="wndDatePickerDayContainer";daySelection.appendChild(dayContainer);var clearContainer=document.createElement('div');clearContainer.className="wndDatePickerClear";if(mayBeEmpty){var clearButton=document.createElement('a');clearButton.innerHTML='Clear';clearButton.onclick=function(e){e=e||window.event;self.clear();self.updateMonth();if(rangeNext)
rangeNext.clear();if(rangePrev)
rangePrev.clear();if(e.preventDefault)
e.preventDefault();e.cancelBubble=true;return false;}
clearContainer.appendChild(clearButton);}
daySelection.appendChild(clearContainer);selectContainer.appendChild(monthSelection);selectContainer.appendChild(daySelection);container.appendChild(selectContainer);if(typeof(button)!='object'){button=document.getElementById(button);}
if(typeof(button)=='object'){button.onclick=function(e){e=e||window.event;self.toggle();if(e.preventDefault)
e.preventDefault();e.cancelBubble=true;return false;}}
this.setPrevious=function(datePicker){rangePrev=datePicker;rangePrev.setNext(this);}
this.setNext=function(datePicker){rangeNext=datePicker;}
this.previousMonth=function(){date.setMonth(date.getMonth()-1);this.updateMonth();}
this.nextMonth=function(){date.setMonth(date.getMonth()+1);this.updateMonth();}
this.updateMonth=function(){monthLabel.innerHTML=months[date.getMonth()]+' '+date.getFullYear();this.updateDays();}
this.updateDays=function(){dayContainer.innerHTML='';var dayToday=new Date();var dayDate=new Date(date.valueOf())
dayDate.setDate(1);var prevDate=new Date(dayDate.valueOf());prevDate.setDate(1-dayDate.getDay());var x=0;for(var i=0;i<dayDate.getDay();i++){var oDay=document.createElement('div');oDay.innerHTML=prevDate.getDate();var postFix='';if(rangePrev&&rangePrev.getSelectedDate()&&prevDate.valueOf()<rangePrev.getSelectedDate().valueOf())
postFix='X';if(rangeNext&&rangeNext.getSelectedDate()&&prevDate.valueOf()>rangeNext.getSelectedDate().valueOf())
postFix='X';oDay.className='wndDatePickerDayBlur'+postFix;dayContainer.appendChild(oDay);prevDate.setDate(prevDate.getDate()+1);x++;}
while(dayDate.getMonth()==date.getMonth()){var oDay=document.createElement('div');oDay.innerHTML=dayDate.getDate();var postFix='';if(rangePrev&&rangePrev.getSelectedDate()&&dayDate.valueOf()<rangePrev.getSelectedDate().valueOf())
postFix='X';if(rangeNext&&rangeNext.getSelectedDate()&&dayDate.valueOf()>rangeNext.getSelectedDate().valueOf())
postFix='X';if(currentDate!=null&&dayDate.getDate()==currentDate.getDate()&&dayDate.getMonth()==currentDate.getMonth()&&dayDate.getFullYear()==currentDate.getFullYear()){oDay.className='wndDatePickerDaySelected'+postFix;}
else if(dayDate.getDate()==dayToday.getDate()&&dayDate.getMonth()==dayToday.getMonth()&&dayDate.getFullYear()==dayToday.getFullYear()){oDay.className='wndDatePickerDayToday'+postFix;}
else{oDay.className='wndDatePickerDay'+postFix;}
if(postFix!='X'){oDay.onclick=function(){self.setDateValue(date.getFullYear(),date.getMonth(),this.innerHTML);self.hide();}}
dayContainer.appendChild(oDay);dayDate.setDate(dayDate.getDate()+1);x++;}
while(x<42){var oDay=document.createElement('div');oDay.innerHTML=dayDate.getDate();var postFix='';if(rangePrev&&rangePrev.getSelectedDate()&&dayDate.valueOf()<rangePrev.getSelectedDate().valueOf())
postFix='X';if(rangeNext&&rangeNext.getSelectedDate()&&dayDate.valueOf()>rangeNext.getSelectedDate().valueOf())
postFix='X';oDay.className='wndDatePickerDayBlur'+postFix;dayContainer.appendChild(oDay);dayDate.setDate(dayDate.getDate()+1);x++;}}
this.validate=function(){if(yearSelect&&daySelect&&monthSelect){var testDate=new Date(yearSelect.value,monthSelect.value-1,daySelect.value);if(testDate.getDate()!=daySelect.value||testDate.getMonth()!=monthSelect.value-1||testDate.getFullYear()!=yearSelect.value)
return false;}
return true;}
this.setClass=function(className){if(daySelect)
daySelect.className=className;if(monthSelect)
monthSelect.className=className;if(yearSelect)
yearSelect.className=className;}
this.getSelectedDate=function(){return currentDate;}
this.clear=function(){currentDate=null;input.value='';}
this.setDateValue=function(year,month,day){date.setFullYear(year);date.setMonth(month);date.setDate(day);if(currentDate==null)
currentDate=new Date();currentDate.setFullYear(year);currentDate.setMonth(month);currentDate.setDate(day);this.updateMonth();if(yearSelect)
yearSelect.value=year;if(monthSelect)
monthSelect.value=month+1;if(daySelect)
daySelect.value=day;input.value=(currentDate.getMonth()+1)+'/'+currentDate.getDate()+'/'+currentDate.getFullYear();}
this.hide=function(){shown=false;selectContainer.style.display='none';}
this.show=function(){this.updateMonth();shown=true;selectContainer.style.display='block';}
this.toggle=function(){if(shown)
this.hide();else
this.show();}
this.hideInput=function(){input.style.display="none";}
function getObject(object){if((typeof object)!='object')
return document.getElementById(object);return object;}
this.setSelects=function(year,month,day){this.setYearSelect(year);this.setMonthSelect(month);this.setDaySelect(day);}
this.setYearSelect=function(object){yearSelect=getObject(object);AttachEvent(yearSelect,'change',function(){self.setDateSelect();});}
this.setMonthSelect=function(object){monthSelect=getObject(object);AttachEvent(monthSelect,'change',function(){self.setDateSelect();});}
this.setDaySelect=function(object){daySelect=getObject(object);AttachEvent(daySelect,'change',function(){self.setDateSelect();});}
this.setDateSelect=function(){this.setDateValue(yearSelect.value,monthSelect.value-1,daySelect.value);input.value=monthSelect.value+'/'+daySelect.value+'/'+yearSelect.value;}
function AttachEvent(targetObject,eventName,eventFunction){if(!targetObject)
return;if(targetObject.attachEvent){targetObject.attachEvent('on'+eventName,eventFunction);}
else{targetObject.addEventListener(eventName,eventFunction,false);}}
AttachEvent(window.document.body,'mouseup',function(){self.hide();});}
function wnd_property_slider(name,container,min,max,value,scale){this.name=name;this.slider=document.createElement('div');this.slider.className='wnd_property_slider';this.slider.id=name+"Slider";this.ticker=document.createElement('div');this.ticker.className='wnd_property_slider_ticker';this.slider.id=name+"Ticker";this.tracker=document.createElement('div')
this.tracker.className='wnd_property_slider_tracker';this.tracker.id=name+"Tracker";this.input=document.createElement('input');this.input.type='text';this.input.value=value;this.input.name=name;this.input.className='wnd_property_slider_input';this.input.slider=this;this.input.onchange=function(){this.value=this.slider.setValue(this.value*this.slider.scale)/this.slider.scale;}
if(typeof container=='object'){this.container=container;}
else if(typeof container=='string'){this.container=document.getElementById(container);}
else{return;}
this.container.appendChild(this.slider);this.container.appendChild(this.input);this.slider.appendChild(this.ticker);this.slider.appendChild(this.tracker);this.max=max;this.min=min;this.value=value;this.scale=scale;this.slider.property=this;this.setValue=function(value,noChange){var changed=false;if(value>this.max)
value=this.max;if(value<this.min)
value=this.min;if(this.value!=value)
changed=true;this.value=value;this.input.value=(this.value/this.scale);this.tracker.style.top=((this.max-this.min)-(this.value-this.min))+'px';if(changed==true&&!noChange&&this.onchange instanceof Function)
this.onchange();return this.value;}
this.changeValue=function(change){this.setValue(this.value+change);}
this.slider.slider=this;this.slider.style.height=(this.max-this.min+12)+'px';this.ticker.style.height=(this.max-this.min)+'px';this.tracker.slider=this;this.tracker.drag=false;this.tracker.onmousedown=function(e){e=e||window.event;this.drag=true;this.dragY=e.clientY;if(e.preventDefault)
e.preventDefault();}
this.slider.onmouseup=function(e){e=e||window.event;this.slider.tracker.drag=false;}
this.slider.onmouseout=function(e){var e=e||window.event;var reltg=(e.relatedTarget)?e.relatedTarget:e.toElement;if(reltg&&this.id==reltg.id&&reltg.id==this.property.name+"Tracker")
return;if((e.clientX<this.offsetLeft||e.clientX>this.offsetLeft+this.offsetWidth||e.clientY<this.offsetTop||e.clientY>this.offsetTop+this.offsetHeight)){this.slider.tracker.drag=false;}}
this.slider.onmousemove=function(e){e=e||window.event;if(this.slider.tracker.drag==true){this.slider.changeValue(-(e.clientY-this.slider.tracker.dragY));this.slider.tracker.dragY=e.clientY;}}
this.setValue(value);this.onchange=function(){}}
function wnd_property_listview(id,template,column,item,subitem,multiselect,enabled){this.id=id;this.column=column;this.item=item;this.subitem=subitem;this.template=template;this.container=document.getElementById(this.id+"_container");this.columns=Array();this.items=Array();this.oncontextmenu=null;this.multiselect=multiselect;this.enabled=enabled;this.add_column=function(newcolumn){this.columns.push(newcolumn);}
this.add_item=function(newitem){if(this.multiselect==true){newitem.checkbox=window.document.createElement('input');newitem.checkbox.type='checkbox';newitem.checkbox.style.padding='0px';newitem.checkbox.style.margin='0px';newitem.checkbox.style.width='16px';newitem.checkbox.style.height='16px';}
newitem.parent=this;this.items.push(newitem);}
this.select=function(id,selected){if(this.enabled===false)
return;if(selected!==false)
selected=true;for(i=0;i<this.items.length;i++){if(this.multiselect==false&&this.items[i].selected==true&&this.items[i].id!=id){this.items[i].selected=false;this.items[i].set_class(false);this.setSelected(this.items[i].id,false);}
else if(this.items[i].id==id){this.items[i].selected=selected;this.items[i].set_class(selected);this.setSelected(this.items[i].id,selected);}}}
this.setSelected=function(id,value){data=getCookie('listview_data');if(data){pos1=data.indexOf(id);if(pos1!=-1){pos2=data.indexOf(';',pos1);if(pos2==-1)
pos2=data.length;data=data.substr(0,pos1-1)+data.substr(pos2,data.length-pos2);}}
data=(data!=null?data+';':'')+id+'='+value;setCookie('listview_data',data);}
this.parse=function(){columns='';items='';selected=new Array();for(i=0;i<this.columns.length;i++){columns=columns+this.column.replace(/\[BUTTON\]/,'<DIV ID="'+this.columns[i].id+'_container"></DIV>');}
for(i=0;i<this.items.length;i++){items=items+this.items[i].parse(this.item,this.subitem);if(this.items[i].selected===true)
selected.push(this.items[i]);}
this.container.innerHTML=this.template.replace(/\[COLUMNS\]/,columns).replace(/\[ITEMS\]/,items).replace(/\[ONCONTEXTMENU\]/,this.oncontextmenu).replace(/\[COUNT_COLUMNS\]/,this.columns.length);for(i=0;i<this.columns.length;i++){this.columns[i].parse();}
for(var i=0;i<selected.length;i++)
selected[i].set_class();}}
function wnd_property_listview_item(id,text,selected,image,subitems,action,onmouseover,onmouseout,image2){this.id=id;this.selected=selected;this.text=text;this.image=image;this.image2=image2;this.subitems=subitems;this.action=action;this.oncontextmenu='';this.onmouseover=onmouseover;this.onmouseout=onmouseout;this.parent=null;this.checkbox=null;this.set_class=function(mouseover){if(mouseover===true)
document.getElementById(this.id).className='wnd_property_listview_item_mouseover';else if(this.selected==true)
document.getElementById(this.id).className='wnd_property_listview_item_selected';else
document.getElementById(this.id).className='wnd_property_listview_item_default';}
this.parse=function(item,subitem){subitems='';for(a=0;a<this.subitems.length;a++){align='left';if(this.parent&&this.parent.columns[a+1])
align=this.parent.columns[a+1].align;subitems=subitems+subitem.replace(/\[TEXT\]/,this.subitems[a]).replace(/\[ALIGN\]/,align);}
align='left';if(this.parent&&this.parent.columns[0])
align=this.parent.columns[0].align;if(this.checkbox){this.checkbox.onclick=this.parent.id+".select('"+this.id+"',this.checked);"
this.checkbox.checked=this.selected;}
var checkbox='';if(this.checkbox){if(this.checkbox.outerHTML)
checkbox=this.checkbox.outerHTML;if(checkbox.indexOf('onclick')==-1){checkbox=new XMLSerializer().serializeToString(this.checkbox);if(checkbox.indexOf('/>')!=-1)
checkbox=checkbox.replace('/>','onclick="'+this.checkbox.onclick+'" '+(this.selected?'checked="checked" ':'')+'/>');else
checkbox=checkbox.replace('>','onclick="'+this.parent.id+".select('"+this.id+"',this.checked);"+'" '+(this.selected?'checked="checked" ':'')+'/>');}}
return item.replace(/\[IMAGE2\]/,(this.image2?'<IMAGE style="position:relative;margin-left:-19px;" SRC="'+this.image2+'">':'')).replace(/\[IMAGE\]/,(this.image?'<IMAGE ALIGN="left" SRC="'+this.image+'">':'')).replace(/\[TEXT\]/,this.text).replace(/\[SUBITEMS\]/,subitems).replace(/\[ACTION\]/,(this.selected!==null&&this.parent.multiselect==false?this.parent.id+".select('"+this.id+"');":'')+this.action).replace(/\[ONCONTEXTMENU\]/,this.oncontextmenu).replace(/\[ALIGN\]/,align).replace(/\[ONMOUSEOVER\]/,this.id+".set_class(true);"+this.onmouseover).replace(/\[ONMOUSEOUT\]/,this.id+".set_class(false);"+this.onmouseout).replace(/\[ID\]/,this.id).replace(/\[CHECKBOX\]/,checkbox);}}
function wnd_property_listview_column(id,button_template_up,button_template_down,caption,image,align,direction){this.id=id;this.button_template_up=button_template_up;this.button_template_down=button_template_down;this.caption=caption;this.image=image;this.button=null;this.align=align;this.direction=direction;this.parse=function(){if(!this.button){direction=this.direction;if(!direction)
direction='ASC';else if(direction=='ASC'){this.image='images/listview_asc.gif';direction='DESC';}
else if(direction=='DESC'){this.image='images/listview_desc.gif';direction='ASC'}
image='';if(this.image)
image='<IMG SRC="'+this.image+'">';strLocation=window.location.href;if(strLocation.indexOf('&direction=')>0){strLocation=strLocation.replace(/\&order_by\=[\w]+?\&direction\=[\w]+/,'&order_by='+this.id+'&direction='+direction);}else{strLocation=strLocation+'&order_by='+this.id+'&direction='+direction;}
this.button=new wnd_property_button(this.id,this.button_template_up.replace(/\[IMAGE\]/,image),this.button_template_down.replace(/\[IMAGE\]/,image),null,"window.location.href='"+strLocation+"';return false;",true,this.caption)
eval(this.id+'_object=this.button;');}}}
function wnd_property_button(id,template_up,template_down,checked,action,enabled,value){this.id=id+'_object';this.input=document.getElementById(id+'_input');this.container=document.getElementById(id+'_container');this.action=action;this.value=value;this.template_up='<DIV onmousedown="'+this.id+'.onmousedown();" onmouseup="'+this.id+'.onmouseup();if('+this.id+'.enabled==false) {return false; }'+this.action.replace(/\[BUTTON_OBJECT_ID\]/g,this.id)+'" onmouseout="'+this.id+'.onmouseout();">'+template_up+'</DIV>';this.template_down='<DIV  onmousedown="'+this.id+'.onmousedown();" onmouseup="'+this.id+'.onmouseup();if('+this.id+'.enabled==false) { return false; }'+this.action.replace(/\[BUTTON_OBJECT_ID\]/g,this.id)+'" onmouseout="'+this.id+'.onmouseout();">'+template_down+'</DIV>';this.checked=checked;this.enabled=enabled;this.down=false;this.onmousedown=function(){this.down=true;if(this.enabled==true)
this.container.innerHTML=this.template_down.replace(/\[VALUE\]/g,this.value);}
this.onmouseup=function(){this.down=false;if(this.enabled==true){if(this.checked===true)
this.checked=false;else if(this.checked===false)
this.checked=true;if(this.input)
this.input.value=(this.checked?1:0);}
this.apply();}
this.onmouseout=function(){if(this.down==true){this.apply();this.down=false;}}
this.apply=function(){if(this.enabled==true)
this.button_enabled='';else
this.button_enabled='DISABLED';if(this.checked==true){this.container.innerHTML=this.template_down.replace(/\[ENABLED\]/g,this.button_enabled).replace(/\[VALUE\]/g,this.value);}else{this.container.innerHTML=this.template_up.replace(/\[ENABLED\]/g,this.button_enabled).replace(/\[VALUE\]/g,this.value);}}
this.apply();}
function wnd_register_context_menu(menu){wnd_context_menus.push(menu);}
function wnd_parse_context_menu(){for(i=0;i<wnd_context_menus.length;i++){wnd_context_menus[i].parse();}}
function wnd_context_menu(name,template){this.items=Array();this.parent=this;this.name=name;this.height=0;this.width=0;this.template=template;this.container=window.document.createElement('DIV');this.container.id=this.name;this.container.style.position='absolute';this.container.style.visibility='hidden';this.container.style.zIndex=0;this.structure_id=1;this.add_item=function(item){item.parent=this;this.items.push(item);}
this.open=function(submenu){this.parse();window.clearInterval(this.interval);this.container.onmousemove=wnd_context_close;wnd_context_open(this.container.id,submenu,this.parent.container);}
this.capture=function(submenu){return;this.parse();clearInterval(this.interval);this.container.onmousemove=wnd_context_close;wnd_context_capture(this.container.id,this.parent.container);}
this.close=function(){}
this.validate=function(){}
this.parse=function(){this.validate();if(!window.document.getElementById(this.container.id)){window.document.body.appendChild(this.container);}
var cxt_content='';this.height=0;for(i=0;i<this.items.length;i++){cxt_content=cxt_content+this.items[i].parse();if(this.items[i].visible===true)
this.height=this.height+this.items[i].height;}
this.container.style.height=this.height;this.container.style.width=this.width;if(window.document.getElementById(this.template).innerText)
this.container.innerHTML=window.document.getElementById(this.template).innerText.replace('[ITEMS]',cxt_content);else
this.container.innerHTML=window.document.getElementById(this.template).childNodes[0].nodeValue.replace('[ITEMS]',cxt_content);return true;}
this.unload=function(){this.container.onmousemove=null;delete this.container;}
var contextmenu=this;FSAttachEvent(window.document.body,'mouseup',function(e){e=e||window.event;if(e.button!=2)wnd_context_close();});FSAttachEvent(window,'unload',function(){contextmenu.unload();});}
function wnd_context_menu_item(template,caption,image,href,target,onclick,description,enabled,grayed,visible){this.submenu=null;this.template=template;this.caption=caption;this.image=image;this.onmouseover="";this.onmousemove="";this.onmouseout="";this.onmousedown="";if(grayed==true){enabled=false;}
this.enabled=enabled;this.grayed=grayed;this.visible=visible;this.target=target;this.onclick=onclick;this.description=description;this.href=href;this.parent=null;this.checked=null;this.parse=function(){if(this.submenu)
this.submenu.parent=this.parent;if(this.visible===true){if(window.document.getElementById(this.template).innerText)
var cxt_content=window.document.getElementById(this.template).innerText;else
var cxt_content=window.document.getElementById(this.template).childNodes[0].nodeValue;cxt_content=cxt_content.replace(/\[CAPTION\]/g,'<DIV '+(this.grayed==true?'STYLE="position:absolute;Filter:alpha(Opacity=30);"':'')+'>'+this.caption+'</DIV>');if(this.checked===null){if(this.image)
cxt_content=cxt_content.replace(/\[IMAGE\]/g,'<IMG '+(this.grayed==true?'STYLE="Filter:Gray;Filter:alpha(Opacity=30);"':'')+' BORDER="0" SRC="'+this.image+'" ALIGN="left">');else
cxt_content=cxt_content.replace(/\[IMAGE\]/g,'');}
else{cxt_content=cxt_content.replace(/\[IMAGE\]/g,(this.checked?'<IMG BORDER="0" SRC="images/cxt_checked.gif" ALIGN="left">':'<IMG BORDER="0" SRC="images/cxt_unchecked.gif" ALIGN="left">'));}
cxt_content=cxt_content.replace(/\[onclick\]/g,(!this.enabled?'':(this.submenu!=null?(this.submenu.container?'if(!'+this.submenu.container.id+'.id || '+this.submenu.container.id+'.style.visibility!=\'visible\')':'')+" { clearInterval("+this.submenu.name+".interval);}":'')+'wnd_context_close(\'\',true);'+this.onclick+''));cxt_content=cxt_content.replace(/\[HREF\]/g,(this.href&&this.enabled?'HREF="'+this.href+'"':''));cxt_content=cxt_content.replace(/\[ENABLED\]/g,(this.enabled?'':'DISABLED'));cxt_content=cxt_content.replace(/\[enabled\]/g,(this.enabled?'':'DISABLED="disabled"'));cxt_content=cxt_content.replace(/\[TARGET\]/g,''+this.target+'');cxt_content=cxt_content.replace(/\[SUBMENU\]/g,(this.submenu!=null?'<IMG BORDER="0" SRC="images/wnd_cxt_sub.gif">':''));cxt_content=cxt_content.replace(/\[onmousedown\]/g,(!this.enabled?'':''+this.onmousedown+''));cxt_content=cxt_content.replace(/\[ONMOUSEOVER\]/g,'wnd_set_xy(event);'+(this.submenu!=null?(this.submenu.container?'if(!'+this.submenu.container.id+'.id || '+this.submenu.container.id+'.style.visibility!=\'visible\')':'')+" { clearInterval("+this.submenu.name+".interval);"+this.submenu.name+'.interval=setInterval(\''+this.submenu.name+'.open(true);\','+(this.onclick?'1000':'200')+');}':'')+this.onmouseover+'');cxt_content=cxt_content.replace(/\[ONMOUSEMOVE\]/g,'window.status=\''+this.description+'\';wnd_set_xy(event);'+this.onmousemove+'"');cxt_content=cxt_content.replace(/\[ONMOUSEOUT\]/g,'window.status=\'\';'+(this.submenu!=null?'clearInterval('+this.submenu.name+'.interval);':'')+this.onmouseout+'');}
else
cxt_content='';return cxt_content;}}
function wnd_set_xy(e){e=e||event;wnd_clientx=e.clientX;wnd_clienty=e.clientY;}
function wnd_adialog(href){return openChild(href,null,480,160,true,true);}
function wnd_handler_env(){if(parseInt(navigator.appVersion)>3){wnd_winW=(document.body.offsetWidth||document.documentElement.offsetWidth)+(window.document.body.scrollLeft||window.document.documentElement.scrollLeft);wnd_winH=(document.body.offsetHeight||document.documentElement.offsetHeight)+(window.document.body.scrollTop||window.document.documentElement.scrollTop);}}
function wnd_handler_setup()
{wnd_handler_env();wnd_top=100;}
function wnd_capture_contextmenu(e,fn,obj){e=e||event;if(e.button==2){wnd_set_xy(e);if(obj)
fn.apply(obj);else
fn();}}
function wnd_context_capture(wnd_id,submenu){if(navigator.appName=='Netscape'&&e.which==3){wnd_context_open(wnd_id,submenu);return false;}
if(navigator.appName=='Microsoft Internet Explorer'&&event.button==2){return false;}
else
return true;}
function wnd_context_close(wnd_id,clear_all){if(typeof(wnd_id)=='object')
wnd_id=null;if(wnd_cxt_id.length==0)
return;if(clear_all||(wnd_id&&wnd_id.srcElement)){index=0;while(wnd_id=wnd_cxt_id[index++]){wnd_handler_close(wnd_id);}
wnd_cxt_id=Array();return}
else if(!wnd_id){if(this){index=wnd_cxt_id.length-1;while(this.id!=wnd_cxt_id[index--]&&wnd_cxt_id.length>0){wnd_id=wnd_cxt_id.pop();if(wnd_id)
wnd_handler_close(wnd_id);}
return;}
wnd_id=wnd_cxt_id.pop();}
if(wnd_id){wnd_handler_close(wnd_id);}}
function wnd_context_open(wnd_id,submenu,srcMenu){try{var tmp=event;}catch(e){var event=null;}
try
{test=window.document.getElementById(wnd_id).id;if(!submenu)
wnd_context_close(null);else{index=wnd_cxt_id.length-1;while(srcMenu.id!=wnd_cxt_id[index--]){wnd_id=wnd_cxt_id.pop();wnd_handler_close(wnd_id);}}
Xmo=(window.document.body.scrollLeft||window.document.documentElement.scrollLeft)+((event?event.clientX-6:wnd_clientx-6));Ymo=(window.document.body.scrollTop||window.document.documentElement.scrollTop)+((event?event.clientY-6:wnd_clienty-6));if(Xmo<1)
Xmo=1;if(Ymo<1)
Ymo=1;wnd_handler_env();wnd_top++;width=document.getElementById(wnd_id).offsetWidth;height=document.getElementById(wnd_id).offsetHeight;if(width+Xmo>wnd_winW)
Xmo=Xmo-(width+Xmo-wnd_winW);if(height+Ymo>wnd_winH)
Ymo=Ymo-(height+Ymo-wnd_winH)
document.getElementById(wnd_id).style.zIndex=wnd_top;document.getElementById(wnd_id).style.visibility="visible";document.getElementById(wnd_id).style.left=Xmo+'px';document.getElementById(wnd_id).style.top=Ymo+'px';if(wnd_act_id){clearInterval(document['wnd_handler_fade']);}
wnd_act_id=wnd_id;wnd_cxt_id.push(wnd_id);return false;}
catch(e)
{}}
function wnd_handler_close(wnd_id){try{document.getElementById(wnd_id).style.visibility="hidden";}
catch(e){alert('Error closing contextmenu '+wnd_id+': '+e.description);throw e;}}
function wnd_handler_open(wnd_id){try
{if(!document.getElementById(wnd_id))
return;var oWindow=document.getElementById(wnd_id);wnd_handler_env();wnd_top++;if(wnd_act_id){clearInterval(document['wnd_handler_fade']);wnd_handler_setOpacity(oWindow,90);}
oWindow.style.zIndex=wnd_top;oWindow.style.visibility="visible";oWindow.style.left=wnd_winW/2-oWindow.offsetWidth/2+'px';oWindow.style.top=wnd_winH/2-oWindow.offsetHeight/2+'px';wnd_handler_setOpacity(oWindow,10);wnd_act_id=wnd_id;document['wnd_handler_fade']=window.setTimeout('wnd_handler_fadein("'+wnd_id+'")',10);}
catch(e)
{}}
function wnd_handler_fadein(wnd_id)
{window.clearInterval(document['wnd_handler_fade']);var oWindow=document.getElementById(wnd_id);wnd_handler_setOpacity(oWindow,oWindow.wndOpacity+20);if(oWindow.wndOpacity<=90)
document['wnd_handler_fade']=window.setTimeout('wnd_handler_fadein("'+wnd_id+'")',10);else{wnd_act_id=null;document['wnd_handler_fade']=null;}}
function wnd_handler_setOpacity(object,opacity){object.wndOpacity=opacity;try{object.style.filter="alpha(opacity:"+opacity+")";}
catch(e){}
try{object.style.KHTMLOpacity=opacity/100;}
catch(e){}
try{object.style.MozOpacity=opacity/100;}
catch(e){}
try{object.style.opacity=opacity/100;}
catch(e){}}<!--
function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x;}
function MM_dragLayer(objName,x,hL,hT,hW,hH,toFront,dropBack,cU,cD,cL,cR,targL,targT,tol,dropJS,et,dragJS){var i,j,aLayer,retVal,curDrag=null,curLeft,curTop,IE=document.all,NS4=document.layers;var NS6=(!IE&&document.getElementById),NS=(NS4||NS6);if(!IE&&!NS)return false;retVal=true;if(IE&&event)event.returnValue=true;if(MM_dragLayer.arguments.length>1){curDrag=MM_findObj(objName);if(!curDrag)return false;if(!document.allLayers){document.allLayers=new Array();with(document)if(NS4){for(i=0;i<layers.length;i++)allLayers[i]=layers[i];for(i=0;i<allLayers.length;i++)if(allLayers[i].document&&allLayers[i].document.layers)
with(allLayers[i].document)for(j=0;j<layers.length;j++)allLayers[allLayers.length]=layers[j];}else{if(NS6){var spns=getElementsByTagName("span");var all=getElementsByTagName("div");for(i=0;i<spns.length;i++)if(spns[i].style&&spns[i].style.position)allLayers[allLayers.length]=spns[i];}
for(i=0;i<all.length;i++)if(all[i].style&&all[i].style.position)allLayers[allLayers.length]=all[i];}}
curDrag.MM_dragOk=true;curDrag.MM_targL=targL;curDrag.MM_targT=targT;curDrag.MM_tol=Math.pow(tol,2);curDrag.MM_hLeft=hL;curDrag.MM_hTop=hT;curDrag.MM_hWidth=hW;curDrag.MM_hHeight=hH;curDrag.MM_toFront=toFront;curDrag.MM_dropBack=dropBack;curDrag.MM_dropJS=dropJS;curDrag.MM_everyTime=et;curDrag.MM_dragJS=dragJS;curDrag.MM_oldZ=(NS4)?curDrag.zIndex:curDrag.style.zIndex;curLeft=(NS4)?curDrag.left:(NS6)?parseInt(curDrag.style.left):curDrag.style.pixelLeft;if(String(curLeft)=="NaN")curLeft=0;curDrag.MM_startL=curLeft;curTop=(NS4)?curDrag.top:(NS6)?parseInt(curDrag.style.top):curDrag.style.pixelTop;if(String(curTop)=="NaN")curTop=0;curDrag.MM_startT=curTop;curDrag.MM_bL=(cL<0)?null:curLeft-cL;curDrag.MM_bT=(cU<0)?null:curTop-cU;curDrag.MM_bR=(cR<0)?null:curLeft+cR;curDrag.MM_bB=(cD<0)?null:curTop+cD;curDrag.MM_LEFTRIGHT=0;curDrag.MM_UPDOWN=0;curDrag.MM_SNAPPED=false;document.onmousedown=MM_dragLayer;document.onmouseup=MM_dragLayer;if(NS)document.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);}else{var theEvent=((NS)?objName.type:event.type);if(theEvent=='mousedown'){var mouseX=(NS)?objName.pageX:event.clientX+document.body.scrollLeft;var mouseY=(NS)?objName.pageY:event.clientY+document.body.scrollTop;var maxDragZ=null;document.MM_maxZ=0;for(i=0;i<document.allLayers.length;i++){aLayer=document.allLayers[i];var aLayerZ=(NS4)?aLayer.zIndex:parseInt(aLayer.style.zIndex);if(aLayerZ>document.MM_maxZ)document.MM_maxZ=aLayerZ;var isVisible=(((NS4)?aLayer.visibility:aLayer.style.visibility).indexOf('hid')==-1);if(aLayer.MM_dragOk!=null&&isVisible)with(aLayer){var parentL=0;var parentT=0;if(NS6){parentLayer=aLayer.parentNode;while(parentLayer!=null&&parentLayer.style.position){parentL+=parseInt(parentLayer.offsetLeft);parentT+=parseInt(parentLayer.offsetTop);parentLayer=parentLayer.parentNode;}}else if(IE){parentLayer=aLayer.parentElement;while(parentLayer!=null&&parentLayer.style.position){parentL+=parentLayer.offsetLeft;parentT+=parentLayer.offsetTop;parentLayer=parentLayer.parentElement;}}
var tmpX=mouseX-(((NS4)?pageX:((NS6)?parseInt(style.left):style.pixelLeft)+parentL)+MM_hLeft);var tmpY=mouseY-(((NS4)?pageY:((NS6)?parseInt(style.top):style.pixelTop)+parentT)+MM_hTop);if(String(tmpX)=="NaN")tmpX=0;if(String(tmpY)=="NaN")tmpY=0;var tmpW=MM_hWidth;if(tmpW<=0)tmpW+=((NS4)?clip.width:offsetWidth);var tmpH=MM_hHeight;if(tmpH<=0)tmpH+=((NS4)?clip.height:offsetHeight);if((0<=tmpX&&tmpX<tmpW&&0<=tmpY&&tmpY<tmpH)&&(maxDragZ==null||maxDragZ<=aLayerZ)){curDrag=aLayer;maxDragZ=aLayerZ;}}}
if(curDrag){document.onmousemove=MM_dragLayer;if(NS4)document.captureEvents(Event.MOUSEMOVE);curLeft=(NS4)?curDrag.left:(NS6)?parseInt(curDrag.style.left):curDrag.style.pixelLeft;curTop=(NS4)?curDrag.top:(NS6)?parseInt(curDrag.style.top):curDrag.style.pixelTop;if(String(curLeft)=="NaN")curLeft=0;if(String(curTop)=="NaN")curTop=0;MM_oldX=mouseX-curLeft;MM_oldY=mouseY-curTop;document.MM_curDrag=curDrag;curDrag.MM_SNAPPED=false;if(curDrag.MM_toFront){eval('curDrag.'+((NS4)?'':'style.')+'zIndex=document.MM_maxZ+1');if(!curDrag.MM_dropBack)document.MM_maxZ++;}
retVal=false;if(!NS4&&!NS6)event.returnValue=false;}}else if(theEvent=='mousemove'){if(document.MM_curDrag)with(document.MM_curDrag){var mouseX=(NS)?objName.pageX:event.clientX+document.body.scrollLeft;var mouseY=(NS)?objName.pageY:event.clientY+document.body.scrollTop;newLeft=mouseX-MM_oldX;newTop=mouseY-MM_oldY;if(MM_bL!=null)newLeft=Math.max(newLeft,MM_bL);if(MM_bR!=null)newLeft=Math.min(newLeft,MM_bR);if(MM_bT!=null)newTop=Math.max(newTop,MM_bT);if(MM_bB!=null)newTop=Math.min(newTop,MM_bB);MM_LEFTRIGHT=newLeft-MM_startL;MM_UPDOWN=newTop-MM_startT;if(NS4){left=newLeft;top=newTop;}
else if(NS6){style.left=newLeft;style.top=newTop;}
else{style.pixelLeft=newLeft;style.pixelTop=newTop;}
if(MM_dragJS)eval(MM_dragJS);retVal=false;if(!NS)event.returnValue=false;}}else if(theEvent=='mouseup'){document.onmousemove=null;if(NS)document.releaseEvents(Event.MOUSEMOVE);if(NS)document.captureEvents(Event.MOUSEDOWN);if(document.MM_curDrag)with(document.MM_curDrag){if(typeof MM_targL=='number'&&typeof MM_targT=='number'&&(Math.pow(MM_targL-((NS4)?left:(NS6)?parseInt(style.left):style.pixelLeft),2)+
Math.pow(MM_targT-((NS4)?top:(NS6)?parseInt(style.top):style.pixelTop),2))<=MM_tol){if(NS4){left=MM_targL;top=MM_targT;}
else if(NS6){style.left=MM_targL;style.top=MM_targT;}
else{style.pixelLeft=MM_targL;style.pixelTop=MM_targT;}
MM_SNAPPED=true;MM_LEFTRIGHT=MM_startL-MM_targL;MM_UPDOWN=MM_startT-MM_targT;}
if(MM_everyTime||MM_SNAPPED)eval(MM_dropJS);if(MM_dropBack){if(NS4)zIndex=MM_oldZ;else style.zIndex=MM_oldZ;}
retVal=false;if(!NS)event.returnValue=false;}
document.MM_curDrag=null;}
if(NS)document.routeEvent(objName);}return retVal;};API=new APICore();function APICore(){this.Require=function(scriptName){APIScriptLoader.Load(scriptName);}
this.IsIE=function(){return(/msie/).test(navigator.userAgent.toLowerCase());}};API.eventHandlers=new Object();API.eventHandlers.length=0;API.eventHandlers.New=function(id){handler=this.Get(id);if(handler)
return handler;API.eventHandlers[this.length]=new eventHandler(id);this.length++;return API.eventHandlers[this.length-1];}
API.eventHandlers.Get=function(id){for(i=0;i<API.eventHandlers.length;i++){if(API.eventHandlers[i].id==id){return API.eventHandlers[i];}}
return false;}
function eventHandler(id){this.id=id;this.events=Array();this.element=null;this.eventIterator=0;try{if(id instanceof Object){this.element=id;this.id=this.element.id;}
else
this.element=document.getElementById(id);this.element.eventHandler=this;this.element.onmouseover=function(){return this.eventHandler.triggerEvent('onmouseover',this);}
this.element.onmousemove=function(){return this.eventHandler.triggerEvent('onmousemove',this);}
this.element.onclick=function(){return this.eventHandler.triggerEvent('onclick',this);}
this.element.onmouseout=function(){return this.eventHandler.triggerEvent('onmouseout',this);}}
catch(e){}
this.attachEvent=function(eventName,eventProcedure,eventTimeout){this.events.push(new eventHandlerEvent(eventName,eventProcedure,eventTimeout));return this.events[this.events.length-1];}
this.triggerEvent=function(eventName,object){for(this.eventIterator=0;this.eventIterator<this.events.length;this.eventIterator++){if(this.events[this.eventIterator].eventName==eventName){if(this.events[this.eventIterator].trigger(object)===false)
return false;}}}}
function eventHandlerEvent(eventName,eventProcedure,eventTimeout){this.eventName=eventName;this.eventProcedure=eventProcedure;this.eventTimeout=eventTimeout;this.trigger=function(object){if(this.eventTimeout){window.setTimeout(this.eventTimeout,this.eventProcedure);return true;}
else{return this.eventProcedure(object);}}};oFaders=new Object();API.faders=oFaders;oFaders.length=0;oFaders.New=function(faderElement,faderTrans,faderFreq,startOpacity,endOpacity,fadeOutFakeOpacity){API.faders[this.length]=new Fader(this.length,faderElement,faderTrans,faderFreq,startOpacity,endOpacity,fadeOutFakeOpacity);this.length++;return API.faders[this.length-1];}
oFaders.Get=function(id){for(i=0;i<this.length;i++){if(API.faders[i].id==id){return API.faders[i];}}
return false;}
function Fader(id,faderElement,faderTrans,faderFreq,startOpacity,endOpacity,fadeOutFakeOpacity){this.element=faderElement;this.id=id;this.element.fader=this;this.interval=null;this.fadeOutFakeOpacity=fadeOutFakeOpacity;if(startOpacity)
this.startOpacity=startOpacity;else
this.startOpacity=0;if(endOpacity)
this.endOpacity=endOpacity;else
this.endOpacity=100;this.opacity=this.startOpacity;this.opacityChange=this.endOpacity-this.startOpacity;if(faderTrans)
this.trans=faderTrans*1000;else
this.trans=500;if(faderFreq)
this.freq=faderFreq;else
this.freq=50;this.cancel=function(){if(this.interval)
window.clearInterval(this.interval);}
this.setOpacity=function(){if(this.opacity>this.endOpacity)
this.opacity=this.endOpacity;if(this.opacity<this.startOpacity)
this.opacity=this.startOpacity;try{this.element.style.filter="alpha(opacity:"+this.opacity+")";}
catch(e){}
try{this.element.style.KHTMLOpacity=this.opacity/100;}
catch(e){}
try{this.element.style.MozOpacity=this.opacity/100;}
catch(e){}
try{this.element.style.opacity=this.opacity/100;}
catch(e){}}
this.fadeIn=function(fading){if(this.interval)
window.clearInterval(this.interval);if(this.element.style.display!='block')
this.element.style.display='block';this.opacity=this.opacity+this.opacityChange/(this.trans/this.freq);this.setOpacity();if(this.opacity!=this.endOpacity)
this.interval=window.setInterval('API.faders['+this.id+'].fadeIn(true);',this.freq);}
this.fadeOut=function(){if(this.interval)
window.clearInterval(this.interval);this.opacity=this.opacity-this.opacityChange/(this.trans/this.freq);if(!this.fadeOutFakeOpacity)
this.setOpacity();if(this.opacity>this.startOpacity)
this.interval=window.setInterval('API.faders['+this.id+'].fadeOut(true);',this.freq);else{this.setOpacity();if(this.opacity==0)
this.element.style.display='none';}}};oControllers=new Object();API.formControllers=oControllers;oControllers.length=0;oControllers.New=function(formId,settings){API.formControllers[this.length]=new formController(this.length,formId,settings);this.length++;return API.formControllers[this.length-1];}
oControllers.Get=function(id){if(API.formControllers[id])
return API.formControllers[id];return false;}
function formController(controllerId,formId,settings){this.id=controllerId;this.mode='default';this.form=document.getElementById(formId);if(this.form){this.form.controller=this;this.form.onsubmit=function(){return this.controller.submit();}
if(this.form.getAttribute('_mode')=='rpc')
this.mode='rpc';else
this.mode='default';}
this.inputs=Array();this.onSubmitSuccess=null;this.onSubmitError=null;this.onRpcExecute=null;this.msg_err=null;this.fdr_err=null;this.msg_vld=null;this.fdr_vld=null;this.msg_inf=null;this.fdr_inf=null;this.radioGroups=Array();this.rpcObject='mailer_ext_rpc';this.rpcFunction='post';this.rpcInputId='name';this.rpcFloodProtect=true;this.rpcFloodProtected=false;this.rpc=null;this.captchaRPC=null;this.captchaImage=null;this.captchaInput=null;this.captchaId=null;this.captchaValid=true;this.captchaCheck=false;this.captchaSubmitted=false;this.error=false;this.ignoreValidation=false;var self=this;this.submit=function(){if(this.ignoreValidation){this.ignoreValidation=false;return true;}
this.captchaSubmitted=true;this.hideInvalid();this.disableSubmit();if(this.verifyInputs()){if(this.captchaCheck==true){this.enableSubmit();return false;}
else if(this.captchaValid==false){this.showError("The captcha you entered is invalid!");this.enableSubmit();return false;}
if(this.mode=='default'){this.enableSubmit();return true;}
else if(this.mode=='rpc'){if(!this.rpc){this.rpc=API.RPC.New(this.rpcObject,this.rpcFunction);this.rpc.controller=this;}
this.rpc.callBack=function(status,xml,text){this.controller.submitted(status,xml,text);}
for(cInputs=0;cInputs<this.inputs.length;cInputs++){switch(this.inputs[cInputs].tagName){case'SELECT':case'TEXTAREA':case'INPUT':inputName=null;switch(this.rpcInputId){case'name':inputName=this.inputs[cInputs].name;break;case'_id':default:inputName=this.inputs[cInputs].getAttribute('_id')
break;}
if(inputName){switch(this.inputs[cInputs].type){case'checkbox':this.rpc.setParameter(inputName,(this.inputs[cInputs].checked?(this.inputs[cInputs].value?this.inputs[cInputs].value:'1'):''));break;default:this.rpc.setParameter(inputName,this.inputs[cInputs].value);break;}}}}
if(typeof(this.onRpcExecute)=='function')
this.onRpcExecute();this.rpc.execute();return false;}}
else{this.enableSubmit();return false;}}
this.submitted=function(status,xml,text){success=false;switch(status){case 200:node=xml.firstChild;switch(node.nodeName){case'error':this.showError(this.form.getAttribute('_error')+'<br />'+node.firstChild.nodeValue);break;case'function':node=node.firstChild;switch(node.nodeName){case'submit':case'reset':break;case'error':if(typeof(this.onSubmitError)!='function'||this.onSubmitError(node.firstChild.nodeValue,xml,text)){this.showError(this.form.getAttribute('_error')+'<br />'+node.firstChild.nodeValue);}
break;case'success':if(typeof(this.onSubmitSuccess)!='function'||this.onSubmitSuccess(node.firstChild.nodeValue,xml,text)){this.showInfo(this.form.getAttribute('_success')+'<br />'+node.firstChild.nodeValue);}
success=true;break;}
break;}
break;default:if(typeof(this.onSubmitError)!='function'||this.onSubmitError('RPC failed with statuscode '+status,xml,text)){this.showError(this.form.getAttribute('_error')+'<br />'+'RPC failed with statuscode '+status);}
break;}
if(success==false||this.rpcFloodProtect==false)
this.enableSubmit();else if(success==true)
this.rpcFloodProtected=true;}
this.disableSubmit=function(){for(i=0;i<this.inputs.length;i++){if(this.inputs[i].type=='submit'||this.inputs[i].type=='image'){this.inputs[i].disabled=true;}}}
this.enableSubmit=function(){for(i=0;i<this.inputs.length;i++){if(this.inputs[i].type=='submit'||this.inputs[i].type=='image'){this.inputs[i].disabled=false;}}}
this.setupInputs=function(settings){var inputProperties=null;if(settings&&settings['properties'])
inputProperties=settings['properties'];var messageDivs=null;if(settings&&settings['messages'])
messageDivs=settings['messages'];if(!this.form)
return;cInputs=this.form.getElementsByTagName('input');for(i=0;i<cInputs.length;i++){oInput=this.setupInput(cInputs[i],inputProperties)
if(oInput!==false)
this.inputs.push(oInput);}
cInputs=this.form.getElementsByTagName('textarea');for(i=0;i<cInputs.length;i++){this.inputs.push(this.setupInput(cInputs[i],inputProperties));}
cInputs=this.form.getElementsByTagName('select');for(i=0;i<cInputs.length;i++){this.inputs.push(this.setupInput(cInputs[i],inputProperties));}
cDivs=this.form.getElementsByTagName('div');for(i=0;i<cDivs.length;i++){if(cDivs[i].getAttribute('message')=="error"||(messageDivs&&messageDivs['error']==cDivs[i].id)){this.msg_err=cDivs[i];this.fdr_err=API.faders.New(this.msg_err,.5);this.msg_err.onclick=function(){this.fader.fadeOut();}}
if(cDivs[i].getAttribute('message')=="invalid"||(messageDivs&&messageDivs['invalid']==cDivs[i].id)){this.msg_vld=cDivs[i];this.fdr_vld=API.faders.New(this.msg_vld,.5);this.msg_vld.onclick=function(){this.fader.fadeOut();}}
if(cDivs[i].getAttribute('message')=="info"||(messageDivs&&messageDivs['info']==cDivs[i].id)){this.msg_inf=cDivs[i];this.fdr_inf=API.faders.New(this.msg_inf,.5);this.msg_inf.onclick=function(){this.fader.fadeOut();}}}}
this.showError=function(message){if(!this.msg_err)
return;cDivs=this.msg_err.getElementsByTagName('*');for(divc=0;divc<cDivs.length;divc++){if(cDivs[divc].getAttribute('content')!==null||cDivs[divc].className=='content'){cDivs[divc].innerHTML=message;break;}}
this.fdr_err.fadeIn();}
this.showInvalid=function(message,addExisting){if(!this.msg_vld)
return;cDivs=this.msg_vld.getElementsByTagName('*');for(divc=0;divc<cDivs.length;divc++){if(cDivs[divc].getAttribute('content')!==null||cDivs[divc].className=='content'){if(!addExisting)
cDivs[divc].innerHTML=message;else{cDivs[divc].innerHTML+=message;}
break;}}
this.fdr_vld.fadeIn();}
this.showInfo=function(message){if(!this.msg_inf)
return;cDivs=this.msg_inf.getElementsByTagName('*');for(divc=0;divc<cDivs.length;divc++){if(cDivs[divc].getAttribute('content')!==null||cDivs[divc].className=='content'){cDivs[divc].innerHTML=message;break;}}
this.fdr_inf.fadeIn();}
this.hideInvalid=function(){if(!this.msg_vld)
return;this.fdr_vld.fadeOut();}
this.setupInput=function(oInput,inputProperties){if(oInput.name=='captcha_id')
this.captcha_id=oInput.value;if(oInput.type=='radio'){if(!oInput.name)
return false;for(cGroups=0;cGroups<this.radioGroups.length;cGroups++){if(this.radioGroups[cGroups].name==oInput.name){this.radioGroups[cGroups].addRadio(oInput);return false;}}
oRadioGroup=new Object();oRadioGroup.tagName='INPUT';oRadioGroup.id=null;oRadioGroup.type='radiogroup';oRadioGroup.name=oInput.name;oRadioGroup.value='';oRadioGroup.checked=false;oRadioGroup.required=false;oRadioGroup.inputs=Array();oRadioGroup.controller=this;oRadioGroup.className='default';oRadioGroup.error='Input invalid, no description specified!';oRadioGroup.events={};oRadioGroup.attachEvent=function(evName,evFn){if(!this.events[evName])
this.events[evName]=new Array();this.events[evName].push(evFn);}
oRadioGroup.triggerEvent=function(evName){if(!this.events[evName])
return;for(var i=0;i<this.events[evName].length;i++){this.events[evName][i]();}}
oRadioGroup.onchange=function(){for(var cRadios=0;cRadios<this.inputs.length;cRadios++){if(this.inputs[cRadios].checked){this.value=this.inputs[cRadios].value;break;}}
this.triggerEvent('onchange');this.controller.verifyInput(this,true);}
oRadioGroup.getAttribute=function(attribute){switch(attribute){case'_required':alert(this.required);return this.required;case'_defaultClass':return'default';case'_errorClass':return'error';case'_error':return this.error;case'_id':return this.id;default:return null;}}
oRadioGroup.apply=function(){for(var cRadios=0;cRadios<this.inputs.length;cRadios++){if(this.className=='default')
this.inputs[cRadios].className=this.inputs[cRadios].getAttribute('_defaultClass');if(this.className=='error')
this.inputs[cRadios].className=this.inputs[cRadios].getAttribute('_errorClass');}}
oRadioGroup.addRadio=function(oRadio){if(!oRadio.getAttribute('_defaultClass'))
oRadio.setAttribute('_defaultClass',oRadio.className);if(!oRadio.getAttribute('_errorClass'))
oRadio.setAttribute('_errorClass',oRadio.className);this.inputs.push(oRadio);if(oRadio.checked)
this.value=oRadio.value;oRadio.radioGroup=this;bRequired=oRadio.getAttribute('_required');if(bRequired!==null)
this.setAttribute('_required',bRequired);sError=oRadio.getAttribute('_error');if(sError!==null)
this.setAttribute('_error',sError);sId=oRadio.getAttribute('_id');if(sId!==null)
this.id=sId;oRadio.onchange=function(){this.radioGroup.onchange();}
oRadio.onclick=oRadio.onchange;}
oRadioGroup.validate=function(){this.value='';this.checked=false;for(cRadios=0;cRadios<this.inputs.length;cRadios++){if(this.inputs[cRadios].checked){this.value=this.inputs[cRadios].value;this.checked=true;return;}}}
oRadioGroup.getAttribute=function(name){return(this[name]?this[name]:null);}
oRadioGroup.setAttribute=function(name,value){return this[name]=value;}
oRadioGroup.addRadio(oInput);this.radioGroups.push(oRadioGroup);oInput=oRadioGroup;}
if(inputProperties&&(inputProperties[oInput.name]||inputProperties[oInput.id])){var inputId=oInput.name;if(inputProperties[oInput.id])
inputId=oInput.id;for(attribute in inputProperties[inputId]){oInput.setAttribute(attribute,inputProperties[inputId][attribute]);}}
if(oInput.getAttribute('_dependencyLayer')){var sLayer=oInput.getAttribute('_dependencyLayer');if(document.getElementById(sLayer)){oInput.dLayer=document.getElementById(sLayer);oInput.dFader=API.faders.New(oInput.dLayer,.5);if(this.getInput(oInput.getAttribute('_dependencyInput'))){oInput.dInput=this.getInput(oInput.getAttribute('_dependencyInput'));}
else if(document.getElementById(oInput.getAttribute('_dependencyInput'))){oInput.dInput=document.getElementById(oInput.getAttribute('_dependencyInput'));}
if(oInput.dInput&&oInput.dInput.value!=oInput.getAttribute('_dependencyValue')){oInput.dLayer.style.display='none';}
oInput.dAttach=function(){var oInput=this;self.attachEvent(oInput.dInput,'change',function(){if(oInput.dInput.value!=oInput.getAttribute('_dependencyValue')){oInput.dFader.fadeOut();}
else{oInput.dFader.fadeIn();}});}
oInput.dAttach();}}
{if(!oInput.getAttribute('_defaultClass'))
oInput.setAttribute('_defaultClass',oInput.className);if(!oInput.getAttribute('_errorClass'))
oInput.setAttribute('_errorClass',oInput.className);if(!oInput.getAttribute('_error'))
oInput.setAttribute('_error',"Input invalid, no description specified!");if((oInput.type=='submit'||oInput.type=='image')&&oInput.getAttribute('_ignore')){oInput.onclick=function(){this.controller.ignoreValidation=true;return true;}}
if(oInput.getAttribute('_errorInput')){document.getElementById(oInput.getAttribute('_errorInput')).setAttribute('_exclude',true);}
if(oInput.getAttribute('_captcha_id')!==null){this.captchaValid=false;}
oInput.controller=this;if(!oInput.onchange){oInput.onchange=function(){this.controller.verifyInput(this,true);return true;}}}
return oInput;}
this.attachEvent=function(targetObject,eventName,eventFunction){if(!targetObject)
return;if(targetObject.attachEvent){targetObject.attachEvent('on'+eventName,eventFunction);}
else{targetObject.addEventListener(eventName,eventFunction,false);}}
this.getInput=function(name){for(var i=0;i<this.inputs.length;i++){if(this.inputs[i].name==name){return this.inputs[i];}}
return null;}
this.verifyInputs=function(){var i=0;var errors="";var valid2=true;this.error=false;for(i=0;i<this.inputs.length;i++){try{if(!this.verifyInput(this.inputs[i],false)){errors=errors+this.inputs[i].getAttribute('_error')+'<br/>';valid2=false;}}
catch(e){valid2=false;alert('failed to validate '+this.inputs[i].id+'. '+e.message);}}
if(valid2==false){this.showInvalid(errors);this.error=true;}
return valid2;}
this.verifyInput=function(oInput,onchange){valid=true;if(this.rpcFloodProtected==true){this.enableSubmit();this.rpcFloodProtected=false;}
if(oInput.dInput&&oInput.dInput.value!=oInput.getAttribute('_dependencyValue'))
return true;if(oInput.getAttribute('_exclude')){return true;}
switch(oInput.tagName){case'TEXTAREA':case'INPUT':switch(oInput.type){case'submit':case'reset':break;case'checkbox':if(oInput.getAttribute('_required')!==null&&!oInput.checked){valid=false;}
break;case'radio':alert('Radio slipped through!')
break;case'radiogroup':oInput.validate();if(oInput.getAttribute('_required')!==null&&!oInput.checked){valid=false;}
break;default:if(oInput.getAttribute('_required')!==null&&!oInput.value){valid=false;}
if(oInput.getAttribute('_maxlen')!==null&&oInput.value.length>oInput.getAttribute('_maxlen')){valid=false;}
if(oInput.getAttribute('_minlen')!==null&&oInput.value.length<oInput.getAttribute('_minlen')){valid=false;}
if((oInput.getAttribute('_captcha_id')||oInput.name=='captcha_input')&&valid==true&&this.captchaCheck==false){if(this.captchaValid==false&&onchange==false){this.captchaValid=false;try{this.captchaImage=document.getElementById(oInput.getAttribute('_captcha_image'));}
catch(e){alert('Captcha image id not set or invalid!');break;}
if(this.captcha_id)
var sId=this.captcha_id;else
var sId=oInput.getAttribute('_captcha_id');if(!this.captchaRPC){this.captchaRPC=API.RPC.New('is_captcha_rpc','check');this.captchaRPC.controller=this;}
this.captchaRPC.callBack=function(status,xml,text){this.controller.verifyCaptcha(status,xml,text);}
this.captchaRPC.setParameter('id',sId);this.captchaRPC.setParameter('answer',oInput.value);this.captchaInput=oInput;this.captchaInput.disabled=true;if(this.captchaCheck==false){this.captchaCheck=true;this.captchaRPC.execute();}}
else if(onchange==true){this.captchaValid=false;}
break;}
if(oInput.getAttribute('_validator')!==null){var validator=null;try{validator=eval(""+oInput.getAttribute('_validator')+"");}
catch(e){}
if(typeof(validator)=='function'){if(!validator(oInput)){valid=false;}}}
if(oInput.datePicker){if(!oInput.datePicker.validate()){valid=false;}}
if(oInput.getAttribute('_mask')!==null){switch(oInput.getAttribute('_mask')){case'hh:mm':mask=new RegExp('[0-2][0-9]:[0-5][0-9]','gm');break;case'dd/mm/yy':mask=new RegExp('[0-3][0-9]/[0-1][0-9]/[0-9][0-9]','gm');break;case'dd-mm-yy':mask=new RegExp('[0-3][0-9]-[0-1][0-9]-[0-9][0-9]','gm');break;case'dd/mm/yyyy':mask=new RegExp('[0-3][0-9]/[0-1][0-9]/[1-2][089][0-9][0-9]','gm');break;case'dd-mm-yyyy':mask=new RegExp('[0-3][0-9]-[0-1][0-9]-[1-2][089][0-9][0-9]','gm');break;case'mm/dd/yy':mask=new RegExp('[0-1][0-9]/[0-3][0-9]/[0-9][0-9]','gm');break;case'mm-dd-yy':mask=new RegExp('[0-1][0-9]-[0-3][0-9]-[0-9][0-9]','gm');break;case'mm/dd/yyyy':mask=new RegExp('[0-1][0-9]/[0-3][0-9]/[1-2][089][0-9][0-9]','gm');break;case'mm-mm-yyyy':mask=new RegExp('[0-1][0-9]-[0-3][0-9]-[1-2][089][0-9][0-9]','gm');break;case'email':mask=new RegExp('[a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}','gm');break;case'postal_nl':mask=new RegExp('[0-9]{4}[ ]{0,1}[A-Za-z]{2}','gm');break;case'phone_nl':mask=new RegExp('(0[0-9]{9})|(0[0-9]{1}[ -]{1}[0-9]{8})|(0[0-9]{2}[ -]{1}[0-9]{7})|(0[0-9]{3}[ -]{1}[0-9]{6})','gm');break;default:mask=new RegExp(oInput.getAttribute('_mask'),'gm');break;}
if(oInput.value.replace(mask,'')!='')
valid=false;}
break;}
break;case'SELECT':if(oInput.getAttribute('_required')!==null&&!oInput.value){valid=false;}
break;}
var errorInput=oInput;if(oInput.getAttribute('_errorInput'))
errorInput=document.getElementById(oInput.getAttribute('_errorInput'));if(valid==true){errorInput.className=oInput.getAttribute('_defaultClass');if(oInput.type=='radiogroup')
oInput.apply();if(oInput.datePicker)
oInput.datePicker.setClass(oInput.getAttribute('_defaultClass'));return true;}
else{errorInput.className=oInput.getAttribute('_defaultClass')+" "+oInput.getAttribute('_errorClass');if(oInput.type=='radiogroup')
oInput.apply();if(oInput.datePicker)
oInput.datePicker.setClass(oInput.getAttribute(oInput.getAttribute('_defaultClass')+" "+'_errorClass'));return false;}}
this.verifyCaptcha=function(status,xml,text){success=false;this.captchaCheck=false;this.captchaInput.disabled=false;switch(status){case 200:node=xml.firstChild;switch(node.nodeName){case'error':this.showError(this.form.getAttribute('_error')+'<br />'+node.firstChild.nodeValue);break;case'function':node=node.firstChild;switch(node.nodeName){case'expired':case'failed':this.captchaInput.className=this.captchaInput.getAttribute('_errorClass');imgSrc=this.captchaImage.src;newImgSrc=imgSrc.replace(/&[.0-9]+/,"&"+Math.random());if(newImgSrc==imgSrc){newImgSrc=imgSrc+"&"+Math.random();}
this.captchaImage.src=newImgSrc;if(node.nodeName=='expired'){this.showInvalid(node.firstChild.nodeValue+'<br/>',this.error);}
else{this.showInvalid(this.captchaInput.getAttribute('_error')+'<br/>',this.error);}
break;case'success':this.captchaInput.className=this.captchaInput.getAttribute('_defaultClass');this.captchaValid=true;if(this.captchaSubmitted==true){this.submit();return;}
break;default:this.captchaInput.className=this.captchaInput.getAttribute('_errorClass');break;}
break;}
break;default:this.showError(this.form.getAttribute('_error')+'<br />'+'RPC failed with statuscode '+status);}
if(this.captchaSubmitted==true)
this.enableSubmit();}
this.setupInputs(settings);};API.frameControllers=new Object();API.frameControllers.length=0;API.frameControllers.New=function(id,type){if(!type)
type='v1';switch(type){case'v2':API.frameControllers[this.length]=new frameController_v2(id);break;case'v1':default:API.frameControllers[this.length]=new frameController_v1(id);break;}
this.length++;return API.frameControllers[this.length-1];}
API.frameControllers.Get=function(id){for(i=0;i<API.frameControllers.length;i++){if(API.frameControllers[i].id==id){return API.frameControllers[i];}}
return false;}
function frameController_v2(id){this.version=2;this.id=id;this.frames=Array();this.current=null;this.swap=0;this.pause=true;this.interval=null;this.setContainer=function(id){try{if(window.name=='frameDialog')
this.container=opener.window.document.getElementById(this.id);else
this.container=document.getElementById(this.id);this.container.controller=this;this.container.onmouseover=function(){if(this.controller.pause==true)
window.clearInterval(this.controller.interval);}
this.container.onmouseout=function(){if(this.controller.pause==true)
this.controller.Run();}}
catch(e){return false;}
return true;}
this.addFrame=function(oFrame,sClass){if(!oFrame)
oFrame=new frameController_v2_frame(this.frames.length);if(window.name=='frameDialog')
return oFrame;this.frames.push(oFrame);oFrame.setController(this);return oFrame;}
this.Show=function(id,hide){if(hide!==false)
hide=true;this.current=id;for(iFrame=0;iFrame<this.frames.length;iFrame++){if(iFrame==id)
this.frames[iFrame].Show(true);else if(hide===true)
this.frames[iFrame].Hide(true);}}
this.Hide=function(id){this.current=id;for(iFrame=0;iFrame<this.frames.length;iFrame++){if(iFrame==id)
this.frames[iFrame].Hide(true);}}
this.Load=function(){if(!this.container)
this.setContainer(this.id);for(iFrame=0;iFrame<this.frames.length;iFrame++){this.frames[iFrame].Load();}
if(this.swap){this.current=-1;this.Swap();}}
this.Swap=function(){window.clearInterval(this.interval);this.current++;if(this.current==this.frames.length)
this.current=0;this.Show(this.current);this.Run();}
this.Run=function(){if(this.swap){this.interval=window.setInterval("API.frameControllers.Get('"+this.id+"').Swap()",this.swap*1000);}}}
function frameController_v2_frame(id){this.id=id;this.controller=null;this.container=null;this.content='';this.shown=false;this.zIncreased=false;this.keep=false;this.interval=null;this.effects=Array();this.className='';this.zIndex=0;this.appendContainerId=null;this.classSwapObjects=Array();this.onshow=function(){if(this.eventHandler)return this.eventHandler.triggerEvent('onshow',this);}
this.onhide=function(){if(this.eventHandler)return this.eventHandler.triggerEvent('onhide',this);}
this.eventHandler=null;this.addClassSwapObjectById=function(id,showClass,hideClass){try{object=document.getElementById(id);if(container){return this.addClassSwapObject(object,showClass,hideClass);}
return false;}
catch(e){return false;}}
this.addClassSwapObject=function(object,showClass,hideClass){if(object){this.classSwapObjects.push({'object':object,'showClass':showClass,'hideClass':hideClass});return true;}
return false;}
this.appendContainerById=function(id){this.appendContainerId=id;if(this.container)
this.appendContainer(document.getElementById(id));}
this.appendContainer=function(object){if(this.container&&object)
this.container.appendChild(object);}
this.setContainerById=function(id,retain_content){try{container=document.getElementById(id);if(container){return this.setContainer(container,retain_content);}
return false;}
catch(e){return false;}}
this.setContainer=function(container,retain_content){this.container=container;if(!retain_content)
container.innerHTML=this.content;container.frame=this;container.style.zIndex=this.zIndex;if(this.keep&&!this.controller.swap){this.attachEvent(container,'onmouseover','show');this.attachEvent(container,'onmouseout','hide',this.keep);}
return true;}
this.setController=function(oController){this.controller=oController;}
this.attachEventById=function(id,event,action,delay){element=document.getElementById(id);if(element){return this.attachEvent(element,event,action,delay);}
return false;}
this.attachEvent=function(element,event,action,delay){element.frame=this;if(!this.controller)
return false;switch(action){case'show':if(!this.controller.swap){if(!delay)
action=function(){this.frame.Show();}
else{element.showDelay=delay;action=function(object){window.clearInterval(this.frame.interval);this.frame.interval=window.setInterval("API.frameControllers.Get('"+this.frame.controller.id+"').frames["+this.frame.id+"].Show();",object.showDelay);}}
break;}
case'swap':if(!delay)
action=function(){this.frame.controller.Show(this.frame.id);}
else{element.swapDelay=delay;action=function(object){window.clearInterval(this.frame.interval);this.frame.interval=window.setInterval("API.frameControllers.Get('"+this.frame.controller.id+"').Show("+this.frame.id+")",object.swapDelay);}}
break;case'hide':if(!this.controller.swap){if(!delay)
action=function(){this.frame.Hide();}
else{element.hideDelay=delay;action=function(object){window.clearInterval(this.frame.interval);this.frame.interval=window.setInterval("API.frameControllers.Get('"+this.frame.controller.id+"').frames["+this.frame.id+"].Hide();",object.hideDelay);}}
break;}
case'continue':action=function(){this.frame.controller.Run();}
break;default:}
if(!element.eventHandler)
handler=API.eventHandlers.New(element.id);else
handler=element.eventHandler;event=handler.attachEvent(event,action);event.frame=this;return true;}
this.setContent=function(content){if(content===false)
return true;this.content=content;if(this.container)
this.container.innerHTML=content;return true;}
this.setContentById=function(id){try{this.setContent(document.getElementById(id).innerHTML);}
catch(e){return false;}
return true;}
this.setContentByRPC=function(href,oInterpreter){if(href=='return false;')
return;if(!oInterpreter)
oInterpreter=new frameController_v2_RawInterpreter();oInterpreter.frame=this;this.interpreter=oInterpreter;this.RPC=API.RPC.New('fs_rpc_index','get');this.RPC.setParameter('href',href);this.RPC.frame=this;this.RPC.callBack=function(status,xml,text){this.frame.setContent(this.frame.interpreter.interpret(text));}
this.RPC.execute();}
this.addEffect=function(oEffect){if(this.container)
oEffect.setContainer(this.container);this.effects.push(oEffect);return oEffect;}
this.Show=function(){window.clearInterval(this.interval);window.clearInterval(this.controller.interval);this.shown=true;this.onshow();if(!this.zIncreased){this.container.style.zIndex++;this.zIncreased=true;}
for(iClassSwapObjects=0;iClassSwapObjects<this.classSwapObjects.length;iClassSwapObjects++){classSwapAttribute=this.classSwapObjects[iClassSwapObjects]['object'].getAttribute('_frameShowClass');if(this.classSwapObjects[iClassSwapObjects]['showClass'])
classSwapAttribute=this.classSwapObjects[iClassSwapObjects]['showClass'];if(classSwapAttribute!==null)
this.classSwapObjects[iClassSwapObjects]['object'].className=classSwapAttribute;}
for(iEffect=0;iEffect<this.effects.length;iEffect++){this.effects[iEffect].Show();}}
this.Hide=function(){window.clearInterval(this.interval);window.clearInterval(this.controller.interval);this.shown=false;this.onhide();if(this.zIncreased){this.container.style.zIndex--;this.zIncreased=false;}
for(iClassSwapObjects=0;iClassSwapObjects<this.classSwapObjects.length;iClassSwapObjects++){classSwapAttribute=this.classSwapObjects[iClassSwapObjects]['object'].getAttribute('_frameHideClass');if(this.classSwapObjects[iClassSwapObjects]['hideClass'])
classSwapAttribute=this.classSwapObjects[iClassSwapObjects]['hideClass'];if(classSwapAttribute!==null)
this.classSwapObjects[iClassSwapObjects]['object'].className=classSwapAttribute;}
for(iEffect=0;iEffect<this.effects.length;iEffect++){this.effects[iEffect].Hide();}}
this.Load=function(){if(!this.controller||!this.controller.container)
return;if(!this.container){oDiv=document.createElement('DIV');oDiv.className=this.className;this.setContainer(oDiv);this.controller.container.appendChild(oDiv);if(this.appendContainerId)
this.appendContainerById(this.appendContainerId);}
for(iEffect=0;iEffect<this.effects.length;iEffect++){this.effects[iEffect].setContainer(this.container);}}}
function frameController_v2_RawInterpreter(){this.interpret=function(data){return data;}}
function frameController_v2_fadeEffect(trans,freq,startOpacity,endOpacity,fadeOutFakeOpacity){this.container=null;this.fader=null;if(trans)
this.trans=trans;else
this.trans=1;if(freq)
this.freq=freq;else
this.freq=100;this.startOpacity=startOpacity;this.endOpacity=endOpacity;this.fadeOutFakeOpacity=fadeOutFakeOpacity;this.setContainer=function(container){this.container=container;}
this.Show=function(){if(!this.fader)
this.fader=API.faders.New(this.container,this.trans,this.freq,this.startOpacity,this.endOpacity,fadeOutFakeOpacity);this.container.style.display='block';this.fader.fadeIn();}
this.Hide=function(){if(!this.fader)
this.fader=API.faders.New(this.container,this.trans,this.freq,this.startOpacity,this.endOpacity,fadeOutFakeOpacity);this.fader.fadeOut();}}
function frameController_v2_slideEffect(attribute,trans,freq,basePosition,increment,equation,currentStep,hideEquation){this.container=null;this.slider=null;if(trans)
this.trans=trans;else
this.trans=1;if(freq)
this.freq=freq;else
this.freq=100;if(attribute)
this.attribute=attribute;else
this.attribute=null;if(basePosition)
this.basePosition=basePosition;else
this.basePosition=0;if(increment)
this.increment=increment;else
this.increment=0;if(equation)
this.equation=equation;else
this.equation=null;if(hideEquation)
this.hideEquation=hideEquation;else if(equation)
this.hideEquation=equation;else
this.hideEquation=null;if(currentStep)
this.currentStep=currentStep;else
this.currentStep=0;this.setContainer=function(container){this.container=container;}
this.getSlider=function(){if(!this.slider){this.slider=API.sliders.New(this.container,this.attribute,this.trans,this.freq,this.basePosition,this.increment,this.equation,this.hideEquation);this.slider.step=this.currentStep;}
return this.slider;}
this.setIncrement=function(newIncrement){if(this.slider)
this.slider.setIncrement(newIncrement);else
this.increment=newIncrement;}
this.Show=function(){this.getSlider();this.container.style.display='block';this.slider.slideIn();}
this.Hide=function(){this.getSlider();this.slider.slideOut();}}
function frameController_v1(id){this.version=1;this.id=id;this.element=document.getElementById(id);this.element.frameController=this;this.menu=null;this.frames=Array();this.fadeMode=this.element.getAttribute('fadeMode');this.fadeFreq=this.element.getAttribute('fadeFreq');this.fadeTrans=this.element.getAttribute('fadeTrans');this.swapFreq=this.element.getAttribute('swapFreq')*1000;this.interval=0;this.current=null;this.Swap=function(){this.current++;if(this.current==this.frames.length)
this.current=0;this.Show(this.current);}
this.clearInterval=function(){if(this.interval)
window.clearInterval(this.interval);}
this.setInterval=function(){if(this.swapFreq){this.interval=window.setInterval("API.frameControllers.Get('"+this.id+"').Swap();",this.swapFreq);}}
this.Show=function(id){this.current=id;if(this.menu)
this.menu.setActive(id);for(i=0;i<this.frames.length;i++){if(i==id)
this.frames[i].Show();else
this.frames[i].Hide();}}
cElements=this.element.getElementsByTagName('div');for(i=0;i<cElements.length;i++){if(cElements[i].getAttribute){frameType=cElements[i].getAttribute('frameType');frameTitle=cElements[i].getAttribute('frameTitle');frameControllerId=cElements[i].getAttribute('frameController');if(frameType&&(frameControllerId==this.id||!frameControllerId)){if(frameType=='Menu'){this.menu=new frameController_v1_Menu(this,cElements[i]);}
else{oFrame=new frameController_v1_Frame(this,frameType,frameTitle,cElements[i]);this.frames.push(oFrame);}}}}
if(this.menu){for(i=0;i<this.frames.length;i++){this.menu.Add(this.frames[i].title);}
this.menu.Parse();}
if(this.frames.length){this.current=0;this.frames[0].Show();if(this.menu)
this.menu.setActive(0);}
this.element.onmouseover=function(){this.frameController.clearInterval();}
this.element.onmouseout=function(){this.frameController.setInterval();}
this.setInterval();}
function frameController_v1_Frame(frameParent,frameType,frameTitle,frameElement){this.parent=frameParent;this.type=frameType;this.title=frameTitle;this.element=frameElement;this.element.parent=this;this.visible=false;this.zIncreased=0;if(this.parent.fadeMode)
this.fader=API.faders.New(this.element,this.parent.fadeTrans,this.parent.fadeFreq);else
this.fader=null;this.Show=function(){if(this.visible==false){if(this.zIncreased==0){this.element.style.zIndex=this.element.style.zIndex+2;this.zIncreased=2;}
if(this.fader)
this.fader.cancel();this.visible=true;if(this.parent.fadeMode=='in'||this.parent.fadeMode=='in2'||this.parent.fadeMode=='both'){this.fader.fadeIn();}
else{this.element.style.display='inline';}}}
this.Hide=function(){if(this.zIncreased>0){this.zIncreased--;this.element.style.zIndex--;}
else
this.element.style.display='none';if(this.visible==true){if(this.fader)
this.fader.cancel();this.visible=false;if(this.parent.fadeMode=='out'||this.parent.fadeMode=='both'){this.fader.fadeOut();}
else if(this.parent.fadeMode!='in2')
this.element.style.display='none';}}}
function frameController_v1_Menu(menuParent,menuElement){this.element=menuElement;this.selectMode=this.element.getAttribute('selectMode');if(!this.selectMode)
this.selectMode='click';this.options=Array();this.parent=menuParent;this.buttonTemplate='buttonTitle';this.buttons=Array();this.classDefault='';this.classDown='';this.classHover='';this.classActive='';for(i2=0;i2<this.element.childNodes.length;i2++){if(this.element.childNodes[i2].getAttribute){menuItem=this.element.childNodes[i2].getAttribute('menuItem');if(menuItem){if(menuItem=='menuButton'){this.buttonTemplate=this.element.childNodes[i2].innerHTML;this.classDefault=this.element.childNodes[i2].getAttribute('classDefault');this.classDown=this.element.childNodes[i2].getAttribute('classDown');this.classHover=this.element.childNodes[i2].getAttribute('classHover');this.classActive=this.element.childNodes[i2].getAttribute('classActive');}}}}
this.element.innerHTML='';this.Add=function(optionTitle){this.options.push(optionTitle);}
this.setActive=function(id){for(i2=0;i2<this.buttons.length;i2++){if(i2==id){this.buttons[i2].className=this.buttons[i2].classActive;this.buttons[i2].active=true;}
else{this.buttons[i2].className=this.buttons[i2].classDefault;this.buttons[i2].active=false;}}}
this.Parse=function(){this.element.innerHTML='';this.buttons=Array();for(i=0;i<this.options.length;i++){oElement=document.createElement('div');oElement.innerHTML=this.buttonTemplate.replace(/\{buttonTitle\}/,this.options[i]);oElement.classDefault=this.classDefault;oElement.classDown=this.classDown;oElement.classHover=this.classHover;oElement.classActive=this.classActive;oElement.className=oElement.classDefault;oElement.active=false;oElement.onclick=function(e){optionId=this.getAttribute('optionId');this.parent.parent.Show(optionId);}
oElement.onmouseout=function(){if(!this.active)
this.className=this.classDefault;}
oElement.onmouseover=function(){if(!this.active)
this.className=this.classHover;if(this.parent.selectMode=='hover'){optionId=this.getAttribute('optionId');this.parent.parent.Show(optionId);}}
oElement.onmousedown=function(){if(!this.active)
this.className=this.classDown;}
oElement.setAttribute('optionId',i);oElement.parent=this;this.element.appendChild(oElement);this.buttons.push(oElement);}}};oRPC=new Object();API.RPC=oRPC;oRPC.length=0;oRPC.New=function(rpcObject,rpcFunction){API.RPC[this.length]=new api_rpc(this.length,rpcObject,rpcFunction);this.length++;return API.RPC[this.length-1];}
oRPC.Get=function(id){if(API.RPC[id])
return API.RPC[id];return false;}
function api_rpc(rpcId,rpcObject,rpcFunction){this.id=rpcId;this.rpcObject=rpcObject;this.rpcFunction=rpcFunction
this.callBack=null;this.completed=false;this.parameter_names=Array();this.parameter_values=Array();this.parameters=0;this.status=null;this.responseText=null;this.responseXML=null;this.interval=null;this.customHref=null;this.requestMethod="POST";this.getHref=function(){if(this.customHref===null)
return"rpc.php?__object="+this.rpcObject+"&__function="+this.rpcFunction;else
return this.customHref;}
this.setHref=function(href){this.customHref=href;}
this.setRequestMethod=function(method){this.requestMethod=method;}
this.getRequestMethod=function(){return this.requestMethod;}
this.execute=function(sync){if(this.xmlRpc){this.completed=false;this.xmlRpc.open(this.getRequestMethod(),this.getHref(),(sync?false:true));if(this.getRequestMethod()=='POST')
this.xmlRpc.setRequestHeader("Content-type","application/x-www-form-urlencoded");else
this.xmlRpc.setRequestHeader("Content-type","text/plain");this.xmlRpc.setRequestHeader("Cache-Control","no-cache");var me=this;this.xmlRpc.onreadystatechange=function(){me.change();}
this.xmlRpc.send(this.parseParameters());return true;}
else
return false;}
this.setParameter=function(name,value){for(var i=0;i<this.parameters;i++){if(this.parameter_names[i]==name){this.parameter_values[i]=value;return;}}
this.parameter_names[this.parameters]=name;this.parameter_values[this.parameters]=value;this.parameters++;}
this.getParameter=function(name){for(var i=0;i<this.parameters;i++){if(this.parameter_names[i]==name){return this.parameter_values[i];}}
return false;}
this.parseParameters=function(){ret='';for(i=0;i<this.parameters;i++){if(ret!='')
ret=ret+"&";ret=ret+escape(this.parameter_names[i])+"="+encodeURIComponent(this.parameter_values[i]);}
return ret;}
this.collectForm=function(form){for(i=0;i<form.elements.length;i++){if(form.elements[i].name)
this.setParameter(form.elements[i].name,form.elements[i].value);else if(form.elements[i].id)
this.setParameter(form.elements[i].id,form.elements[i].value);}}
this.change=function(){if(this.xmlRpc.readyState==4&&this.completed==false){this.status=this.xmlRpc.status;this.responseText=this.xmlRpc.responseText;this.responseXML=this.xmlRpc.responseXML;if(this.xmlRpc.responseXML){this.responseXML.loadXML(this.responseText);}
else{parser=new DOMParser();this.responseXML=parser.parseFromString(this.responseText,"text/xml");}
if(this.callBack)
this.callBack(this.status,this.responseXML.documentElement,this.responseText);this.completed=true;if(this.interval){window.clearInterval(this.interval);this.interval=null;}}};/*@cc_on @*//*@if (@_jscript_version >= 5)
    // JScript gives us Conditional compilation, we can cope with old IE versions.
    // and security blocked creation of the objects.
 try{
  this.xmlRpc = new ActiveXObject("Msxml2.XMLHTTP");
 } catch(e){
  try{
   this.xmlRpc = new ActiveXObject("Microsoft.XMLHTTP");
  }catch(e){
   this.xmlRpc = false;
  }
 }
   @end @*/try{if(!this.xmlRpc&&typeof XMLHttpRequest!='undefined'){this.xmlRpc=new XMLHttpRequest();}}
catch(e){alert(e.message);this.xmlRpc=false;}};oSliders=new Object();API.sliders=oSliders;oSliders.length=0;oSliders.New=function(sliderElement,sliderAttribute,sliderTrans,sliderFreq,basePosition,increment,equation,hideEquation){API.sliders[this.length]=new Slider(this.length,sliderElement,sliderAttribute,sliderTrans,sliderFreq,basePosition,increment,equation,hideEquation);this.length++;return API.sliders[this.length-1];}
oSliders.Get=function(id){for(i=0;i<this.length;i++){if(API.sliders[i].id==id){return API.sliders[i];}}
return false;}
function Slider(id,sliderElement,sliderAttribute,sliderTrans,sliderFreq,basePosition,increment,equation,hideEquation){this.element=sliderElement;this.id=id;this.element.slider=this;this.interval=null;this.step=0;this.basePosition=basePosition;this.increment=increment;this.equation=equation;this.eventHandler=null;if(hideEquation)
this.hideEquation=hideEquation;else
this.hideEquation=equation;this.position=0;this.attribute=sliderAttribute;if(sliderTrans)
this.trans=sliderTrans*1000;else
this.trans=500;if(sliderFreq)
this.freq=sliderFreq;else
this.freq=50;this.attachEvent=function(eventName,eventProcedure){if(!this.eventHandler)
API.eventHandlers.New(this);this.eventHandler.attachEvent(eventName,eventProcedure);}
this.setPosition=function(slideDirection){this.getPosition(slideDirection);switch(this.attribute){case'top':this.element.style.top=(this.basePosition+this.position)+'px';break;case'bottom':this.element.style.bottom=(this.basePosition+this.position)+'px';break;case'left':this.element.style.left=(this.basePosition+this.position)+'px';break;case'right':this.element.style.right=(this.basePosition+this.position)+'px';break;case'width':this.element.style.width=(this.basePosition+this.position)+'px';break;case'height':this.element.style.height=(this.basePosition+this.position)+'px';break;case'margin-top':this.element.style.marginTop=(this.basePosition+this.position)+'px';break;case'margin-bottom':this.element.style.marginBottom=(this.basePosition+this.position)+'px';break;case'margin-left':this.element.style.marginLeft=(this.basePosition+this.position)+'px';break;case'margin-right':this.element.style.marginRight=(this.basePosition+this.position)+'px';break;case'padding-top':this.element.style.paddingTop=(this.basePosition+this.position)+'px';break;case'padding-bottom':this.element.style.paddingBottom=(this.basePosition+this.position)+'px';break;case'padding-left':this.element.style.paddingLeft=(this.basePosition+this.position)+'px';break;case'padding-right':this.element.style.paddingRight=(this.basePosition+this.position)+'px';break;}
if(this.eventHandler)
this.eventHandler.triggerEvent('onSetPosition_'+slideDirection,this);}
this.getPosition=function(slideDirection){if(this.equation&&slideDirection=='in')
this.position=Math.round(this.equation(this.step,this.increment));else if(this.hideEquation&&slideDirection=='out')
this.position=Math.round(this.hideEquation(this.step,this.increment));else
this.position=Math.round((this.step/100)*this.increment);}
this.setIncrement=function(newIncrement){if(newIncrement==this.increment)
return;ratio=newIncrement/this.increment;this.step=Math.round(this.step/ratio);this.backStep=this.step;this.increment=newIncrement;if(!this.interval)
this.slideIn();}
this.slideIn=function(sliding){if(this.interval){window.clearInterval(this.interval);this.interval=null;}
if(this.step<100){this.step=this.step+100/(this.trans/this.freq);if(this.step>100)
this.step=100;}
else if(this.step>100){this.step=this.step-(this.backStep-100)/(this.trans/this.freq);if(this.step<100)
this.step=100;}
this.setPosition('in');if(this.step!=100)
this.interval=window.setInterval('API.sliders['+this.id+'].slideIn(true);',this.freq);}
this.slideOut=function(){if(this.interval){window.clearInterval(this.interval);this.interval=null;}
if(this.step<=100)
this.step=this.step-100/(this.trans/this.freq);else
this.step=this.step-(this.backStep-100)/(this.trans/this.freq);if(this.step<0)
this.step=0;this.setPosition('out');if(this.step>0)
this.interval=window.setInterval('API.sliders['+this.id+'].slideOut(true);',this.freq);}};oWindow=new Object();API.window=oWindow;APIScriptLoader.Load('Window_Template');APIScriptLoader.Load('Window_Properties');APIScriptLoader.Load('wnd_property_dmenu');APIScriptLoader.Load('wnd_property_autocomplete');;oProperties=new Object();API.window.properties=oProperties;oProperties.length=0;oProperties.New=function(property){API.window.properties[this.length-1]=property;this.length++;return property;}
oProperties.Get=function(id){for(iProperties=0;iProperties<this.length;i++){if(API.window.properties[iProperties].id&&API.window.properties[iProperties].id==id)
return API.window.properties[iProperties];}
return false;};function window_template(template){this.template=template;this.parse=function(tags){template=this.template;for(iTags in tags){template=template.replace('['+iTags+']',tags[iTags]);}
return template;}};function wnd_property_autocomplete(input_id,property_id,trigger){var autoComplete=this;this.rpc=API.RPC.New('wnd_property_autocomplete_rpc','autoComplete');this.rpc.callBack=function(status,xml,text){autoComplete.rpcSuggestions(status,xml,text);}
this.highlighted=null;this.matches=null;this.input=document.getElementById(input_id);this.property_id=property_id;this.trigger=1;this.cancelBlur=false;if(trigger)
this.trigger=trigger;this.createContainer=function(){var oContainer=document.createElement('div');oContainer.className='wnd_property_autocomplete';oContainer.style.display='none';oContainer.style.marginTop=(this.input.offsetHeight)+'px';oContainer.onmousedown=function(){autoComplete.cancelBlur=true;}
return oContainer;}
this.applyInputValue=function(input){if(input.name){switch(input.tagName.toLowerCase()){case'input':switch(input.type){case'checkbox':case'radio':this.rpc.setParameter(input.name,(input.checked?(input.value?input.value:'1'):''));break;default:this.rpc.setParameter(input.name,input.value);break;}
break;case'textarea':case'select':this.rpc.setParameter(input.name,input.value);break;}}}
this.getSuggestions=function(value){if(value.length==this.trigger||value.length>this.trigger&&this.matches==null){this.rpc.setParameter('search',value.substring(0,this.trigger));var cInputs=null;cInputs=this.input.form.getElementsByTagName('input');for(var i=0;i<cInputs.length;i++){this.applyInputValue(cInputs[i]);}
cInputs=this.input.form.getElementsByTagName('textarea');for(var i=0;i<cInputs.length;i++){this.applyInputValue(cInputs[i]);}
cInputs=this.input.form.getElementsByTagName('select');for(var i=0;i<cInputs.length;i++){this.applyInputValue(cInputs[i]);}
this.rpc.setParameter('property',this.property_id);this.rpc.execute();}
else if(value.length<this.trigger){this.hideSuggestions();}
else{this.processSuggestions();}}
this.matchOnMouseOver=function(){if(autoComplete.highlighted!==null)
autoComplete.container.childNodes[autoComplete.highlighted].className='';this.className='wnd_property_autocomplete_hover';autoComplete.highlighted=this.matchId;}
this.matchOnMouseOut=function(){this.className='';if(autoComplete.highlighted==this.matchId)
autoComplete.highlighted=null;}
this.matchOnClick=function(){autoComplete.input.value=this.innerHTML;autoComplete.hideSuggestions();}
this.processSuggestions=function(){if(this.matches!=null&&this.matches.length){var previousHighlight=null;if(autoComplete.highlighted!==null&&autoComplete.container.childNodes[autoComplete.highlighted]){previousHighlight=autoComplete.container.childNodes[autoComplete.highlighted].innerHTML;}
this.container.innerHTML='';this.highlighted=null;var height=0;var counter=0;for(var match in this.matches){if(this.matches[match].substr(0,this.input.value.length).toLowerCase()==this.input.value.toLowerCase()){var oDiv=document.createElement('div');oDiv.innerHTML=this.matches[match];if(this.matches[match]==previousHighlight){this.highlighted=counter;oDiv.className='wnd_property_autocomplete_hover';}
oDiv.onmouseover=this.matchOnMouseOver;oDiv.onmouseout=this.matchOnMouseOut;oDiv.onclick=this.matchOnClick;oDiv.matchId=counter;this.container.appendChild(oDiv);height=height+16;counter++;}}
if(this.container.innerHTML!=''){if(height>199)
height=199;this.container.style.height=(height+1)+'px';this.showSuggestions();}
else
this.hideSuggestions();}
else{this.hideSuggestions();}}
this.rpcSuggestions=function(status,xml,text){this.matches=new Array();var error='Unknown error';try{var node=xml.firstChild;switch(node.nodeName){case'error':error=node.firstChild.nodeValue;default:this.container.innerHTML='Error: '+error;this.showSuggestions();break;case'function':node=node.firstChild;switch(node.nodeName){case'error':this.container.innerHTML='Error: '+node.firstChild.nodeValue;this.showSuggestions();break;case'nomatches':this.container.innerHTML=node.firstChild.nodeValue;this.showSuggestions();break;case'matches':this.container.innerHTML='';for(var i=0;i<node.childNodes.length;i++){this.matches.push(node.childNodes.item(i).firstChild.nodeValue);}
this.processSuggestions();break;}
break;}}
catch(e){error=e.description;this.container.innerHTML='Error: '+error;this.showSuggestions();}}
this.hideSuggestions=function(){this.container.style.display='none';}
this.showSuggestions=function(){this.container.style.display='block';this.container.style.marginTop=(this.input.offsetHeight+2)+'px';this.container.style.width=(this.input.offsetWidth)+'px';}
this.attachToInput=function(){this.input.parentNode.insertBefore(this.container,this.input);this.input.onkeydown=function(e){var e=e||window.event;var keyCode=null;if(e.keyIdentifier>0)
keyCode=e.keyIdentifier;else if(e.keyCode>0)
keyCode=e.keyCode;else if(e.which>0)
keyCode=e.which;else if(e.charCode>0)
keyCode=e.charCode;switch(keyCode){case 13:e.cancelBubble=true;return false;break;}}
this.input.onkeyup=function(e){var e=e||window.event;var keyCode=null;if(autoComplete.matches===null){autoComplete.getSuggestions(this.value);return false;}
if(e.keyIdentifier>0)
keyCode=e.keyIdentifier;else if(e.keyCode>0)
keyCode=e.keyCode;else if(e.which>0)
keyCode=e.which;else if(e.charCode>0)
keyCode=e.charCode;switch(keyCode){case 38:e.cancelBubble=true;if(autoComplete.highlighted>0){autoComplete.container.childNodes[autoComplete.highlighted].className='';autoComplete.highlighted--;autoComplete.container.childNodes[autoComplete.highlighted].className='wnd_property_autocomplete_hover';}
return false;case 40:e.cancelBubble=true;if(autoComplete.container.childNodes.length>0&&(autoComplete.highlighted===null||autoComplete.highlighted<autoComplete.container.childNodes.length-1)){if(autoComplete.highlighted===null)
autoComplete.highlighted=0;else{autoComplete.container.childNodes[autoComplete.highlighted].className='';autoComplete.highlighted++;}
autoComplete.container.childNodes[autoComplete.highlighted].className='wnd_property_autocomplete_hover';}
return false;case 13:e.cancelBubble=true;if(autoComplete.highlighted!==null&&autoComplete.container.childNodes[autoComplete.highlighted]){autoComplete.input.value=autoComplete.container.childNodes[autoComplete.highlighted].innerHTML;autoComplete.hideSuggestions();}
return true;default:autoComplete.getSuggestions(this.value);break;}}
this.input.onblur=function(e){var e=e||window.event;if(!autoComplete.cancelBlur)
autoComplete.hideSuggestions();else
autoComplete.cancelBlur=false;}}
this.container=this.createContainer();this.attachToInput();};function wnd_property_dmenu(id,value,multiSelect){this.id=id;this.items=Array();this.container=null;this.input=null;this.onChange=null;this.className='wnd_property_dmenu';this.list=null;this.button=null;this.multiSelect=multiSelect;this.multiSelectMayBeEmpty=true;this.offsetLeft=0;this.offsetTop=0;if(this.multiSelect)
this.value='';else
this.value=value;this.multiSelectItem=null;this.templates=new Array();this.dropUp=false;this.setTemplate=function(name,template){this.templates[name]=template;}
this.setValue=function(value){if(this.multiSelect){this.value='';if(!this.multiSelectMayBeEmpty){countSelected=0
for(iItems=0;iItems<this.items.length;iItems++){if(this.items[iItems].selected)
countSelected++;}}
for(iItems=0;iItems<this.items.length;iItems++){if(this.items[iItems].value==value){if(!this.multiSelectMayBeEmpty&&countSelected==1&&this.items[iItems].selected){}
else{this.items[iItems].selected=(!this.items[iItems].selected);this.items[iItems].showSelected();}}
if(this.items[iItems].selected)
this.value+=(this.value?';':'')+this.items[iItems].value;}
if(this.input)
this.input.value=this.value;}
else{doChange=false;if(value!=this.value&&this.onChange)
doChange=true;this.value=value;if(this.input)
this.input.value=this.value;this.setSelected();if(doChange)
this.onChange();}}
this.getSelected=function(){for(iItems=0;iItems<this.items.length;iItems++){if(this.items[iItems].selected==true)
return this.items[iItems];}}
this.setSelected=function(){for(iItems=0;iItems<this.items.length;iItems++){if(!this.multiSelect)
this.items[iItems].selected=false;if(this.items[iItems].value==this.value)
this.items[iItems].selected=true;}
this.update();}
this.setMultiSelectItem=function(item){item.menu=this;this.multiSelectItem=item;return item;}
this.addItem=function(item){item.menu=this;this.items.push(item);if(this.multiSelect){if(item.selected)
this.value+=(this.value?';':'')+item.value;}
else{if(item.selected==true&&item.value!=this.value){this.value=item.value;this.setValue(item.value);}
if(item.value==this.value)
item.selected=true;}
return item;}
this.listShown=function(){if(!this.list)
return false;if(this.list.style.display=='block'){return true;}
return false;}
this.toggleList=function(){if(this.listShown())
this.hideList();else
this.showList();}
this.showList=function(){if(this.container.parentNode){if(this.container.parentNode.style.position=='absolute'){this.offsetLeft=this.container.parentNode.offsetLeft;this.offsetTop=this.container.parentNode.offsetTop;}
else if(this.container.parentNode.tagName=='TD'){}}
this.beforeShowValue=this.value;this.button.listShown();this.list.style.display='block';this.container.style.zIndex++;if(document.documentElement.offsetHeight<this.container.offsetTop+this.container.offsetHeight+this.list.offsetHeight){this.list.style.top=this.offsetTop-this.list.offsetHeight;this.dropUp=true;}}
this.hideList=function(){if(!this.listShown())
return false;this.button.listHidden();this.list.style.display='none';this.container.style.zIndex--;if(this.value!=this.beforeShowValue&&this.onChange){this.onChange();this.beforeShowValue=this.value;}}
this.checkHideList=function(e,object,isList){var reltg=(e.relatedTarget)?e.relatedTarget:e.toElement;while(reltg.tagName!='BODY'){if(reltg.id==this.id){return false;}
reltg=reltg.parentNode;}
return true;switch(this.dropUp){case false:default:if(object==this.container&&e.clientX>this.offsetLeft+object.offsetLeft&&e.clientX<this.offsetLeft+object.offsetLeft+object.offsetWidth&&e.clientY>this.offsetTop+object.offsetTop&&e.clientY<this.offsetTop+object.offsetTop+object.offsetHeight+this.list.offsetHeight){return false;}
else if(object==this.list&&e.clientX>this.offsetLeft+object.offsetLeft&&e.clientX<this.offsetLeft+object.offsetLeft+object.offsetWidth&&e.clientY>this.offsetTop+object.offsetTop-this.container.offsetHeight&&e.clientY<this.offsetTop+object.offsetTop+object.offsetHeight+this.container.offsetHeight){return false;}
break;case true:if(object==this.container&&e.clientX>this.offsetLeft+object.offsetLeft&&e.clientX<this.offsetLeft+object.offsetLeft+object.offsetWidth&&e.clientY>this.offsetTop+object.offsetTop-this.list.offsetHeight&&e.clientY<this.offsetTop+object.offsetTop+object.offsetHeight){return false;}
else if(object==this.list&&e.clientX>this.offsetLeft+(object.offsetLeft|this.container.offsetLeft)&&e.clientX<this.offsetLeft+(object.offsetLeft|this.container.offsetLeft)+object.offsetWidth&&e.clientY>(this.offsetTop+this.container.offsetTop-this.list.offsetHeight)&&e.clientY<(this.offsetTop+this.container.offsetTop+this.container.offsetHeight)){return false;}
break;}
if(object==this.list){}
return true;}
this.updateSelected=function(){if(this.multiSelect){oSelected=this.multiSelectItem.parse(this.templates['selected'],this.templates['action']);}
else{oSelected=this.getSelected().parse(this.templates['selected'],this.templates['action']);}
oSelected.onclick=function(e){e=e||window.event;this.item.onClick(e);if(!e.cancelBubble)
this.menu.showList();}
return oSelected;}
this.updateDropDown=function(){oDropDown=new wnd_property_dmenu_dropdown(this);this.button=oDropDown;oElement=oDropDown.parse(this.templates['ddbutton']);if((!this.multiSelect&&this.items.length<2)||this.items.length<1){oElement.style.display='none';}
return oElement;}
this.updateList=function(show){oList=document.createElement('div');oList.menu=this;oList.onmouseout=function(e){e=e||window.event;if(this.menu.checkHideList(e,this,true)){this.menu.hideList();}}
oList.className=this.className+'_list';if(!show)
oList.style.display='none';else
oList.style.display='block';oList.innerHTML=this.templates['list'].parse();for(iList=0;iList<this.items.length;iList++){if(this.multiSelect||this.items[iList].selected==false){oList.appendChild(this.items[iList].parse(this.templates['item'],this.templates['action']));}}
this.list=oList;return oList;}
this.update=function(){if(!this.container)
return;this.container.innerHTML='';this.container.appendChild(this.updateSelected());this.container.appendChild(this.updateDropDown());this.container.appendChild(this.updateList(this.listShown()));if(this.listShown())
this.button.listShown();}
this.parse=function(){document.write('<div class="'+this.className+'" id="'+this.id+'"></div>');document.write('<input type="hidden" name="'+this.id+'" id="'+this.id+'_input" value="'+this.value+'">');this.container=document.getElementById(this.id);this.container.menu=this;this.container.onmouseout=function(e){e=e||window.event;if(this.menu.checkHideList(e,this,false)){this.menu.hideList();}}
this.input=document.getElementById(this.id+'_input');this.update();}}
function wnd_property_dmenu_item(title,value,image,action,selected){this.menu=null
this.title=title;this.value=value;this.image=image;this.selected=selected;this.actions=Array();this.action=action;this.container=null;this.baseClassName='';this.showSelected=function(){if(this.selected)
this.container.childNodes[0].className=this.baseClassName+'_selected';else
this.container.childNodes[0].className=this.baseClassName+'_hover';}
this.onClick=function(e){if(!this.action||this.action()!==false){this.menu.setValue(this.value);}
else{e.cancelBubble=true;}}
this.addAction=function(action){action.item=this;action.menu=this.menu;this.actions.push(action);return action;}
this.onMouseOver=function(){this.container.childNodes[0].className=this.baseClassName+(this.menu.multiSelect&&this.selected==true?'_selected':'')+'_hover';}
this.onMouseOut=function(e){this.container.childNodes[0].className=this.baseClassName+(this.menu.multiSelect&&this.selected==true?'_selected':'');}
this.onMouseDown=function(){this.container.childNodes[0].className=this.baseClassName+(this.menu.multiSelect&&this.selected==true?'_selected':'')+'_down';}
this.onMouseUp=function(){this.container.childNodes[0].className=this.baseClassName+(this.menu.multiSelect&&this.selected==true?'_selected':'')+'_hover';}
this.parseActions=function(oItem,actionTemplate){oPlaceHolder=null;cElements=oItem.getElementsByTagName('div');for(iElements=0;iElements<cElements.length;iElements++){if(cElements[iElements].id=='_tmp_wnd_property_item_actions'){oPlaceHolder=cElements[iElements];oContainer=oPlaceHolder.parentNode;break;}}
if(!oPlaceHolder)
return;for(iActions=this.actions.length-1;iActions>=0;iActions--){oContainer.insertBefore(this.actions[iActions].parse(actionTemplate),oPlaceHolder);}
oContainer.removeChild(oPlaceHolder);}
this.parse=function(itemTemplate,actionTemplate){oItem=document.createElement('div');oItem.item=this;oItem.menu=this.menu;oItem.onmouseover=function(){this.item.onMouseOver();};oItem.onmouseout=function(e){e=e||window.event;this.item.onMouseOut(e);};oItem.onmousedown=function(){this.item.onMouseDown();};oItem.onmouseup=function(){this.item.onMouseUp();};oItem.onclick=function(e){e=e||window.event;this.item.onClick(e);};oItem.innerHTML=itemTemplate.parse({"TITLE":this.title,"IMAGE":this.image,'ACTIONS':'<div id="_tmp_wnd_property_item_actions"></div>'});this.parseActions(oItem,actionTemplate);this.container=oItem;if(!this.container.hasChildNodes){alert('Invalid templating on dmenu item! (No childNodes in container)');}
this.baseClassName=this.container.childNodes[0].className;if(this.menu.multiSelect){if(this.selected)
this.container.childNodes[0].className=this.baseClassName+'_selected';}
return oItem;}}
function wnd_property_dmenu_item_action(image,action){this.image=image;this.action=action;this.item=null;this.menu=null;this.container=null;this.onClick=function(e){e.cancelBubble=true;if(this.action)
this.action();}
this.onMouseOver=function(e){this.container.childNodes[0].className=this.baseClassName+'_hover';}
this.onMouseOut=function(e){this.container.childNodes[0].className=this.baseClassName;}
this.onMouseDown=function(e){e.cancelBubble=true;this.container.childNodes[0].className=this.baseClassName+'_down';}
this.onMouseUp=function(e){e.cancelBubble=true;this.container.childNodes[0].className=this.baseClassName+'_hover';}
this.parse=function(actionTemplate){oAction=document.createElement('div');oAction.action=this;oAction.onmouseover=function(e){e=e||window.event;this.action.onMouseOver(e);};oAction.onmouseout=function(e){e=e||window.event;this.action.onMouseOut(e);};oAction.onmousedown=function(e){e=e||window.event;this.action.onMouseDown(e);};oAction.onmouseup=function(e){e=e||window.event;this.action.onMouseUp(e);};oAction.onclick=function(e){e=e||window.event;this.action.onClick(e);};oAction.innerHTML=actionTemplate.parse({"IMAGE":this.image});this.container=oAction;if(!this.container.hasChildNodes){alert('Invalid templating on dmenu item! (No childNodes in container)');}
this.baseClassName=this.container.childNodes[0].className;return oAction;}}
function wnd_property_dmenu_dropdown(menu){this.menu=menu;this.container=null;this.baseClassName='';this.onClick=function(e){this.menu.toggleList();}
this.onMouseOver=function(){if(!this.menu.listShown())
this.container.childNodes[0].className=this.baseClassName+'_hover';}
this.onMouseOut=function(){if(!this.menu.listShown())
this.container.childNodes[0].className=this.baseClassName;}
this.onMouseDown=function(){this.container.childNodes[0].className=this.baseClassName+'_down';}
this.onMouseUp=function(){if(!this.menu.listShown())
this.container.childNodes[0].className=this.baseClassName+'_hover';}
this.listShown=function(){this.container.childNodes[0].className=this.baseClassName+'_down';}
this.listHidden=function(){this.container.childNodes[0].className=this.baseClassName;}
this.parse=function(dropdownTemplate){oItem=document.createElement('div');oItem.item=this;oItem.menu=this.menu;oItem.onmouseover=function(){this.item.onMouseOver();};oItem.onmouseout=function(){this.item.onMouseOut();};oItem.onmousedown=function(){this.item.onMouseDown();};oItem.onmouseup=function(){this.item.onMouseUp();};oItem.onclick=function(e){e=e||window.event;this.item.onClick(e);};oItem.innerHTML=dropdownTemplate.parse({"TITLE2":this.title});this.container=oItem;if(!this.container.hasChildNodes){alert('Invalid templating on dmenu dropdown button! (No childNodes in container)');}
this.baseClassName=this.container.childNodes[0].className;return oItem;}};function polls_openmain(href){fs_process_forms();try{setRelativeHref(href,window.top.frameMain.frameStructureMain.location);}catch(e){try{setRelativeHref(href,window.opener.location);}catch(e){}}}
function polls_main_load(){var frameSet=top.frameMain.document.getElementsByTagName('frameset')[0];frameSet.cols="300,0,*";}
function polls_main_unload(){var frameSet=top.frameMain.document.getElementsByTagName('frameset')[0];frameSet.cols="300,*,0";top.frameMain.frameStructureLoading.loading();};function generics_openmain(href){fs_process_forms();window.top.frameMain.frameStructureMain.location.href=href;}
function generics_main_load(){top.frameMain.document.all.frameset.cols="300,0,*";}
function generics_main_unload(){top.frameMain.frameStructureLoading.loading();top.frameMain.document.all.frameset.cols="300,*,0";};function stabu_structure_openmain(href){setRelativeHref(href,window.top.frameMain.frameStructureMain.location);}
function stabu_structure_main_load(){top.frameMain.document.all.frameset.cols="0,*";}
function stabu_structure_main_unload(){top.frameMain.frameStructureLoading.loading();top.frameMain.document.all.frameset.cols="*,0";};function news_openmain(href){fs_process_forms();setRelativeHref(href,window.top.frameMain.frameStructureMain.location);}
function news_main_load(){var frameSet=top.frameMain.document.getElementsByTagName('frameset')[0];frameSet.cols="300,0,*";}
function news_main_unload(){var frameSet=top.frameMain.document.getElementsByTagName('frameset')[0];frameSet.cols="300,*,0";top.frameMain.frameStructureLoading.loading();};function osc_bridge_files_form_add_option(formid,id,textvalue){window.opener.osc_bridge_files_add_option(formid,id,textvalue);}
function osc_bridge_images_form_add_option(formid,id,textvalue,format){window.opener.osc_bridge_images_add_option(formid,id,textvalue,format);}
function show_extra_images(id){if(document.getElementById(id)){document.getElementById(id).style.display='inline';}}
function hide_extra_images(id){if(document.getElementById(id)){document.getElementById(id).style.display='none';}}
function osc_bridge_view_display_mode_toggle(select){if(document.getElementById('container')){container=document.getElementById('container');}else{return false;}
switch(select.selectedIndex){case 0:break;case 1:break;case 2:break;case 3:break;case 4:container.innerHTML=document.getElementById('filter');container.style.disply="block";break;}};if(API){oFlashMovies=new Object();API.flashMovies=oFlashMovies;oFlashMovies.length=0;oFlashMovies.New=function(id,movie,width,height,bgcolor,wmode){API.flashMovies[this.length]=new flashMovie(id,movie,width,height,bgcolor,wmode);this.length++;return API.flashMovies[this.length-1];}
oFlashMovies.Get=function(id){if(API.googleMaps[id])
return API.googleMaps[id];return false;}}
function flashMovie(id,movie,width,height,bgcolor,wmode){this.allowScriptAccess='sameDomain';this.movie='';if(movie)
this.movie=movie;this.quality='high';this.bgcolor='';if(bgcolor)
this.bgcolor=bgcolor;this.width='';if(width)
this.width=width;this.height='';if(height)
this.height=height
this.id='';if(this.id)
this.id=id;this.wmode='transparent';if(wmode)
this.wmode=wmode;this.align='';this.parse=function(){object='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+this.width+'" height="'+this.height+'" id="'+this.id+'" align="'+this.align+'">';object=object+'<param name="allowScriptAccess" value="'+this.allowScriptAccess+'" />';object=object+'<param name="movie" value="'+this.movie+'" />';object=object+'<param name="quality" value="'+this.quality+'" />';object=object+'<param name="bgcolor" value="'+this.bgcolor+'" />';object=object+'<param name="wmode" value="'+this.wmode+'" />';object=object+'<embed src="'+this.movie+'" quality="'+this.quality+'" wmode="'+this.wmode+'" bgcolor="'+this.bgcolor+'" width="'+this.width+'" height="'+this.height+'" name="'+this.id+'" align="'+this.align+'" allowScriptAccess="'+this.allowScriptAccess+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';document.write(object);}};function vfs_structure_openmain(href){setRelativeHref(href,window.top.frameMain.frameStructureMain.location);}
function vfs_structure_main_load(){var frameSet=top.frameMain.document.getElementsByTagName('frameset')[0];frameSet.cols="0,*";}
function vfs_structure_main_unload(){var frameSet=top.frameMain.document.getElementsByTagName('frameset')[0];frameSet.cols="*,0";top.frameMain.frameStructureLoading.loading();};if(API){oMaps=new Object();API.googleMaps=oMaps;API.googleMaps.version=3;oMaps.length=0;oMaps.New=function(containerId,controlNav,controlType){switch(this.version){case 3:API.googleMaps[this.length]=new googleMap3(this.length,containerId,controlNav,controlType);break;default:API.googleMaps[this.length]=new googleMap(this.length,containerId,controlNav,controlType);break;}
this.length++;return API.googleMaps[this.length-1];}
oMaps.Get=function(id){if(API.googleMaps[id])
return API.googleMaps[id];return false;}
oMaps.LoadAll=function(){for(googleMaps=0;googleMaps<this.length;googleMaps++)
API.googleMaps[googleMaps].Load();}
oMaps.Unload=function(){try{switch(this.version){case 3:break;default:GUnload();break;}}
catch(e){}}
oMaps.Marker=function(location,infoWindow,centerZoom,noInfoWindow,$lat,$lng){switch(this.version){case 3:return new googleMap3Marker(location,infoWindow,centerZoom,noInfoWindow,$lat,$lng);default:return new googleMapMarker(location,infoWindow,centerZoom,noInfoWindow);}}
oMaps.Directions=function(containerId,loadHandler,errorHandler){switch(this.version){case 3:return new googleMap3Directions(containerId,loadHandler,errorHandler);default:return new googleMapDirections(containerId,loadHandler,errorHandler);}}
if(this.version<3)
window.onunload=oMaps.Unload;}
function googleMap3(mapId,containerId,controlNav,controlType){this.id=mapId;this.containerId=containerId;this.controlNav=controlNav;this.controlType=controlType;this.controlDirections=false;this.directionsContainerId=null;this.directionsLoadHandler=null;this.directionsErrorHandler;this.Directions=null;this.Object=null;this.Geocoder=null;this.markers=Array();this.currentMarker=0;this.defaultZoom=10;this.autoInfoWindow=true;this.currentInfoWindow=null;this.customMarker=null;this.customMarkerMax=100;this.customMarkerDefault='blank';this.startLocation=null;this.startZoom=null;this.bounds={'lLat':null,'lLng':null,'hLat':null,'hLng':null};this.setBounds=function(lat,lng){if(this.bounds['lLat']===null||this.bounds['lLat']>lat)
this.bounds['lLat']=lat;if(this.bounds['hLat']===null||this.bounds['hLat']<lat)
this.bounds['hLat']=lat;if(this.bounds['lLng']===null||this.bounds['lLng']>lng)
this.bounds['lLng']=lng;if(this.bounds['hLng']===null||this.bounds['hLng']<lng)
this.bounds['hLng']=lng;}
var oContainer=null;this.Load=function(){oContainer=document.getElementById(this.containerId);if(!oContainer)
return false;var mapOptions={zoom:4,mapTypeControl:this.controlType,navigationControl:this.controlNav,mapTypeId:google.maps.MapTypeId.ROADMAP}
this.Object=new google.maps.Map(oContainer,mapOptions);this.Geocoder=new google.maps.Geocoder();this.Geocoder.googleMap=this;if(this.controlDirections){this.Directions.Load();}
if(this.startLocation){this.googleMap.Object.setCenter(this.startLocation,this.startZoom?this.startZoom:this.defaultZoom);}
else if(!this.startLocation&&this.markers.length>1){var low=new google.maps.LatLng(this.bounds['lLat'],this.bounds['lLng']);var high=new google.maps.LatLng(this.bounds['hLat'],this.bounds['hLng']);var bounds=new google.maps.LatLngBounds(low,high);this.Object.fitBounds(bounds);}
this.currentMarker=0;this.LoadNextMarker();}
this.LoadNextMarker=function(){if(this.markers.length>this.currentMarker){oMarker=this.markers[this.currentMarker];this.currentMarker++;oMarker.Load();}}
this.addMarker=function(marker){if(marker instanceof googleMap3Marker){marker.googleMap=this;this.markers.push(marker);if(marker.lat!==null&&marker.lng!==null){this.setBounds(marker.lat,marker.lng)}
return marker;}
else
return false;}
this.addDirections=function(oDirections){if(oDirections instanceof googleMap3Directions){this.controlDirections=true;oDirections.googleMap=this;this.Directions=oDirections;return oDirections;}
else
return false;}
this.getMarker=function(marker){if(this.markers.length==0)
return null;if(marker){return this.markers[marker];}
return this.markers[0];}
this.getDirections=function(from,to){this.Directions.getDirections(from,to);}
this.closeInfoWindow=function(){if(this.currentInfoWindow){this.currentInfoWindow.close();this.currentInfoWindow=null;}}
this.setInfoWindow=function(infoWindow){this.currentInfoWindow=infoWindow;}}
function googleMap3Directions(containerId,loadHandler,errorHandler){this.containerId=containerId;this.loadHandler=loadHandler;this.errorHandler=errorHandler;this.Object=null
this.googleMap=null;this.to=null;var me=this;this.Load=function(){oContainer=document.getElementById(this.containerId)
if(!oContainer)
return false;oDirections=new google.maps.DirectionsRenderer();oDirections.setMap(this.googleMap.Object);oDirections.setPanel(oContainer);this.service=new google.maps.DirectionsService();this.Object=oDirections;}
this.getDirections=function(from,to){if(!to)
to=this.to;var request={origin:from,destination:to,travelMode:google.maps.DirectionsTravelMode.DRIVING};this.service.route(request,function(response,status){if(status==google.maps.DirectionsStatus.OK){me.Object.setDirections(response);}});}
this.setDefaultTo=function(to){this.to=to;}}
function googleMap3Marker(location,infoWindow,centerZoom,noInfoWindow,lat,lng){this.location=location;this.infoWindow=infoWindow;this.centerZoom=centerZoom;this.googleMap=null;this.oInfoWindow=null;this.noInfoWindow=noInfoWindow;this.lat=lat;this.lng=lng;this.Load=function(){if(this.googleMap instanceof googleMap3){var oGoogleMapMarker=this;if(this.lng&&this.lat){var oLocation=new google.maps.LatLng(this.lat,this.lng);this._Mark(oLocation);var marker=this;window.setTimeout(function(){marker.googleMap.LoadNextMarker();},1);}
else{this.googleMap.Geocoder.geocode({'address':this.location},function(result,status){oGoogleMapMarker.Mark(result,status);});}}}
this.Mark=function(result,status){if(status==google.maps.GeocoderStatus.OK){this._Mark(result[0].geometry.location);}
var marker=this;window.setTimeout(function(){marker.googleMap.LoadNextMarker();},150);}
this._Mark=function(location){if(this.googleMap.startLocation===null){if(this.centerZoom&&this.googleMap.markers.length==1){this.googleMap.Object.setZoom(this.centerZoom);this.googleMap.Object.setCenter(location,this.centerZoom);}
else if(this.googleMap.markers.length>1){}}
var markerOptions={map:this.googleMap.Object,position:location,animation:google.maps.Animation.DROP};if(this.googleMap.customMarker!==null){var seq=this.googleMap.customMarkerDefault;if(this.googleMap.markers.length>1){if(this.googleMap.currentMarker<9){seq='0'+this.googleMap.currentMarker;}
else{seq=this.googleMap.currentMarker;if(seq>this.googleMap.customMarkerMax)
seq=this.googleMap.customMarkerDefault;}}
var icon=this.googleMap.customMarker.replace('[SEQ]',seq);markerOptions['icon']=icon;}
this.marker=new google.maps.Marker(markerOptions);this.marker.marker=this;this.oInfoWindow=new google.maps.InfoWindow({content:this.infoWindow});if(!this.noInfoWindow&&this.googleMap.markers.length==1&&this.googleMap.autoInfoWindow){this.oInfoWindow.open(this.googleMap.Object,this.marker);}
var marker=this;google.maps.event.addListener(this.marker,'click',function(){marker.focus();});}
this.focus=function(){this.googleMap.closeInfoWindow();if(this.oInfoWindow){this.oInfoWindow.open(this.googleMap.Object,this.marker);this.googleMap.setInfoWindow(this.oInfoWindow);}
if(this.googleMap.Directions)
this.googleMap.Directions.setDefaultTo(this.location);}
this.onClick=function(){this.openInfoWindowHtml(this.marker.infoWindow);}}
function googleMap(mapId,containerId,controlNav,controlType){this.id=mapId;this.containerId=containerId;this.controlNav=controlNav;this.controlType=controlType;this.controlDirections=false;this.directionsContainerId=null;this.directionsLoadHandler=null;this.directionsErrorHandler;this.Directions=null;this.Object=null;this.Geocoder=null;this.markers=Array();this.addMarker=function(marker){if(marker instanceof googleMapMarker){marker.googleMap=this;this.markers.push(marker);return marker;}
else
return false;}
this.addDirections=function(oDirections){if(oDirections instanceof googleMapDirections){this.controlDirections=true;oDirections.googleMap=this;this.Directions=oDirections;return oDirections;}
else
return false;}
this.Load=function(){if(GBrowserIsCompatible()){try{oContainer=document.getElementById(this.containerId);if(!oContainer)
return false;this.Object=new GMap2(oContainer);this.Geocoder=new GClientGeocoder();this.Geocoder.googleMap=this;for(markersCount=0;markersCount<this.markers.length;markersCount++){oMarker=this.markers[markersCount];oMarker.Load();}
if(this.controlNav)
this.Object.addControl(new GSmallMapControl());if(this.controlType)
this.Object.addControl(new GMapTypeControl());if(this.controlDirections){this.Directions.Load();}}
catch(e){return false;}}
else
return false;return true;}}
function googleMapDirections(containerId,loadHandler,errorHandler){this.containerId=containerId;this.loadHandler=loadHandler;this.errorHandler=errorHandler;this.Object=null
this.googleMap=null;this.Load=function(){oContainer=document.getElementById(this.containerId)
if(!oContainer)
return false;oDirections=new GDirections(this.googleMap.Object,oContainer);this.Object=oDirections;if(this.loadHandler)
GEvent.addListener(this.Object,'load',this.loadHandler);if(this.errorHandler)
GEvent.addListener(this.Object,'error',this.errorHandler);}}
function googleMapMarker(location,infoWindow,centerZoom,noInfoWindow){this.location=location;this.infoWindow=infoWindow;this.centerZoom=centerZoom;this.googleMap=null;this.noInfoWindow=noInfoWindow;this.Load=function(){if(this.googleMap instanceof googleMap){var oGoogleMapMarker=this;this.googleMap.Geocoder.getLatLng(this.location,function(point){oGoogleMapMarker.Mark(point);});}}
this.Mark=function(point){if(!point){return;}
if(this.centerZoom)
this.googleMap.Object.setCenter(point,this.centerZoom);this.GMarker=new GMarker(point);this.GMarker.marker=this;this.googleMap.Object.addOverlay(this.GMarker);if(!this.noInfoWindow)
this.GMarker.openInfoWindowHtml(this.infoWindow);GEvent.addListener(this.GMarker,'click',this.onClick);}
this.onClick=function(){this.openInfoWindowHtml(this.marker.infoWindow);}};function coms_structure_openmain(href){setRelativeHref(href,window.top.frameMain.frameStructureMain.location);}
function coms_structure_main_load(){var frameSet=top.frameMain.document.getElementsByTagName('frameset')[0];frameSet.cols="0,*";}
function coms_structure_main_unload(){var frameSet=top.frameMain.document.getElementsByTagName('frameset')[0];frameSet.cols="*,0";top.frameMain.frameStructureLoading.loading();};function pl_structure_openmain(href){setRelativeHref(href,window.top.frameMain.frameStructureMain.location);}
function pl_structure_main_load(){top.frameMain.document.all.frameset.cols="300,0,*";}
function pl_structure_main_unload(){top.frameMain.frameStructureLoading.loading();top.frameMain.document.all.frameset.cols="300,*,0";};function aums_structure_openmain(href){setRelativeHref(href,window.top.frameMain.frameStructureMain.location);}
function aums_structure_main_load(){var frameSet=top.frameMain.document.getElementsByTagName('frameset')[0];frameSet.cols="300,0,*";}
function aums_structure_main_unload(){var frameSet=top.frameMain.document.getElementsByTagName('frameset')[0];frameSet.cols="300,*,0";top.frameMain.frameStructureLoading.loading();};function early_birdie_main_load(){top.frameMain.document.all.frameset.cols="0,*";}
function early_birdie_main_unload(){top.frameMain.frameStructureLoading.loading();top.frameMain.document.all.frameset.cols="*,0";};function fm_structure_openmain(href){setRelativeHref(href,window.top.frameMain.frameStructureMain.location);}
function fm_structure_main_load(){var frameSet=top.frameMain.document.getElementsByTagName('frameset')[0];frameSet.cols="300,0,*";}
function fm_structure_main_unload(){var frameSet=top.frameMain.document.getElementsByTagName('frameset')[0];frameSet.cols="300,*,0";top.frameMain.frameStructureLoading.loading();};function customdb_openmain(href){fs_process_forms();setRelativeHref(href,window.top.frameMain.frameStructureMain.location);}
function customdb_main_load(){var frameSet=top.frameMain.document.getElementsByTagName('frameset')[0];frameSet.cols="300,0,*";}
function customdb_main_unload(){var frameSet=top.frameMain.document.getElementsByTagName('frameset')[0];frameSet.cols="300,*,0";top.frameMain.frameStructureLoading.loading();};function is_structure_openmain(href){if(window.opener)
var location=window.opener.top.frameMain.frameStructureMain.location;else
var location=window.top.frameMain.frameStructureMain.location;setRelativeHref(href,location);}
function is_structure_main_load(){var frameSet=top.frameMain.document.getElementsByTagName('frameset')[0];frameSet.cols="300,0,*";}
function is_structure_main_unload(){var frameSet=top.frameMain.document.getElementsByTagName('frameset')[0];frameSet.cols="300,*,0";top.frameMain.frameStructureLoading.loading();}
function is_property_image_size(name,container,formatWidth,formatHeight,scale,image,imageWidth,imageHeight,x,y,zoom){if(typeof container=='object'){this.container=container;}
else if(typeof container=='string'){this.container=document.getElementById(container);}
else{return;}
this.format=document.createElement('div');this.format.className='is_property_image_size';this.image=document.createElement('div')
this.image.style.position='relative';this.image.unselectable="on";oImage=document.createElement('img');oImage.src=image;oImage.width=imageWidth;oImage.height=imageHeight;oImage.unselectable="on";this.image.appendChild(oImage);this.format.appendChild(this.image);this.container.appendChild(this.format);oButton=document.createElement('input');oButton.type="button";oButton.o=this;oButton.onclick=function(){alert(this.o.imageX);}
this.container.parentNode.onmousemove=function(e){e=e||window.event;if(e.preventDefault)
e.preventDefault();}
this.inputX=document.createElement('input');this.inputX.type='hidden';this.inputX.name=name+'_x';this.container.appendChild(this.inputX);this.inputY=document.createElement('input');this.inputY.type='hidden';this.inputY.name=name+'_y';this.container.appendChild(this.inputY);this.inputZ=document.createElement('input');this.inputZ.type='hidden';this.inputZ.name=name+'_z';this.container.appendChild(this.inputZ);this.drag=false;this.dragStartX=0;this.dragStartY=0;this.imageX=x*scale;this.imageY=y*scale;this.dragEndX=0;this.dragEndY=0;this.formatWidth=0;this.formatHeight=0;this.imageWidth=imageWidth;this.imageHeight=imageHeight;this.scale=1;this.zoom=1;this.sliderContainer=document.createElement('div');this.sliderContainer.style.width="30px";this.sliderContainer.style.position='absolute';this.container.appendChild(this.sliderContainer);this.setFormatSize=function(width,height){this.formatWidth=width;this.formatHeight=height;this.applyFormatSize();this.format.style.position='absolute';this.format.style.top="50%";this.format.style.left="50%";this.format.style.marginTop='-'+(this.formatHeight/2*this.scale)+'px';this.format.style.marginLeft='-'+(this.formatWidth/2*this.scale)+'px';}
this.applyFormatSize=function(){this.format.style.width=(this.formatWidth*this.scale)+'px';this.format.style.height=(this.formatHeight*this.scale)+'px';}
this.setScale=function(scale){this.scale=scale;this.applyFormatSize();}
this.setZoom=function(zoom){minZoomX=this.formatWidth/this.imageWidth;minZoomY=this.formatHeight/this.imageHeight;if(zoom<minZoomX)
zoom=minZoomX;if(zoom<minZoomY)
zoom=minZoomY;zoom=Math.floor(zoom*1000)/1000;zoomChange=zoom/this.zoom;this.zoom=zoom;this.inputZ.value=zoom;this.image.childNodes[0].width=this.imageWidth*this.getZoom();this.image.childNodes[0].height=this.imageHeight*this.getZoom();this.setImageOffset(this.imageX/this.scale*zoomChange*this.scale,this.imageY/this.scale*zoomChange*this.scale);return this.zoom;}
this.getZoom=function(noScale){if(noScale)
return this.zoom;return this.zoom*this.scale;}
this.setImageOffset=function(x,y){x=Math.round(x);y=Math.round(y);if(x<0)
x=0;if(y<0)
y=0;if(x>(this.imageWidth*this.getZoom())-this.formatWidth*this.scale)
x=(this.imageWidth*this.getZoom())-this.formatWidth*this.scale;if(y>(this.imageHeight*this.getZoom())-this.formatHeight*this.scale)
y=(this.imageHeight*this.getZoom())-this.formatHeight*this.scale;if(x<0)
x=0;if(y<0)
y=0;this.imageX=x;this.imageY=y
this.inputX.value=Math.round(x/this.getZoom());this.inputY.value=Math.round(y/this.getZoom());this.image.style.left=-this.imageX+'px';this.image.style.top=-this.imageY+'px';this.drag=false;}
this.onmousedown=function(e){e=e||window.event;this.resizer.drag=true;this.resizer.dragStartX=e.clientX;this.resizer.dragStartY=e.clientY;if(e.preventDefault)
e.preventDefault();}
this.onmouseup=function(e){e=e||window.event;if(this.resizer.drag==true){this.resizer.reposition(e.clientX,e.clientY);this.resizer.dragEnd();}}
this.onmousemove=function(e){e=e||window.event;if(this.resizer.drag==false)
return;this.resizer.reposition(e.clientX,e.clientY);}
this.onmouseout=function(e){e=e||window.event;if(this.resizer.drag==true){this.resizer.dragEnd();}}
this.dragEnd=function(){this.drag=false;this.setImageOffset((this.imageX-(this.dragEndX-this.dragStartX)),(this.imageY-(this.dragEndY-this.dragStartY)));}
this.reposition=function(x,y){newX=(this.imageX-(x-this.dragStartX));newY=(this.imageY-(y-this.dragStartY));if(newX<0)
newX=0;if(newY<0)
newY=0;if(newX>(this.imageWidth*this.getZoom())-this.formatWidth*this.scale)
newX=(this.imageWidth*this.getZoom())-this.formatWidth*this.scale;if(newY>(this.imageHeight*this.getZoom())-this.formatHeight*this.scale)
newY=(this.imageHeight*this.getZoom())-this.formatHeight*this.scale;this.image.style.left=-newX+'px';this.image.style.top=-newY+'px';this.dragEndX=x;this.dragEndY=y;}
this.image.resizer=this;this.image.onmousedown=this.onmousedown;this.image.onmouseup=this.onmouseup;this.image.onmousemove=this.onmousemove;this.image.onmouseout=this.onmouseout;this.setScale(scale);this.setFormatSize(formatWidth,formatHeight);zoom=this.setZoom(zoom);if(zoom==1){zoom=0;}
else if(zoom>1){zoom=(zoom-1)*100;}
else if(zoom<1){zoom=-(100-(zoom*100));}
zoom=Math.floor(zoom*100)/100
minZoom=this.formatWidth/this.imageWidth;if(this.formatHeight/this.imageHeight>minZoom)
minZoom=this.formatHeight/this.imageHeight;if(minZoom==1){minZoom=0;}
else if(minZoom>1){minZoom=(minZoom-1)*100;}
else if(minZoom<1){minZoom=-(100-(minZoom*100));}
maxZoom=minZoom+210;this.slider=new wnd_property_slider(name+"Slider",this.sliderContainer,minZoom,maxZoom,zoom,10);this.slider.resizer=this;this.slider.onchange=function(){if(this.value>0){retvalue=this.resizer.setZoom(1+(this.value/100));}
else if(this.value<0){retvalue=this.resizer.setZoom(1-(1/100*-this.value));}
else{retvalue=this.resizer.setZoom(1);}
if(retvalue==1){newValue=0;}
else if(retvalue>1){newValue=(retvalue-1)*100;}
else if(retvalue<1){newValue=-(100-(retvalue*100));}
this.setValue(Math.floor(newValue*100)/100,true);}};function mailer_mailForm(form,callback){var mailer_mailForm_callback=callback;try{myRpc=new rpc("mailer_rpc","mail");myRpc.callBack=function(status,xml,text){if(xml.firstChild.firstChild.nodeName=="success"){mailer_mailForm_callback(true);}
else{mailer_mailForm_callback(false);}}
myRpc.collectForm(form);myRpc.execute();}
catch(e){mailer_mailForm_callback(false);}};function brambo_send(id,affiliate){if(!affiliate)
affiliate=10481;window.open("http://www.ringtonio.nl/send/?id="+id+"&rtaff="+affiliate+"&clx=1&rtlo=25917","sendpop","toolbar=no,location=no,directories=no,"+"status=yes,menubar=no,scrollbars=no,resizable=no,"+"copyhistory=no,width=600,height=450,screenX=0,"+"screenY=0,top=0,left=0");};function wing_structure_openmain(href){fs_process_forms();window.top.frameMain.frameStructureMain.location.href=href;}
function wing_structure_main_load(){top.frameMain.document.all.frameset.cols="300,0,*";}
function wing_structure_main_unload(){top.frameMain.frameStructureLoading.loading();top.frameMain.document.all.frameset.cols="300,*,0";}
if(!swfobject){var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return}f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return}if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return}}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return}var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}
if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return}var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return}AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();}
if(!this.JSON){JSON=function(){function f(n){return n<10?'0'+n:n;}
Date.prototype.toJSON=function(){return this.getUTCFullYear()+'-'+
f(this.getUTCMonth()+1)+'-'+
f(this.getUTCDate())+'T'+
f(this.getUTCHours())+':'+
f(this.getUTCMinutes())+':'+
f(this.getUTCSeconds())+'Z';};var escapeable=/["\\\x00-\x1f\x7f-\x9f]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){return escapeable.test(string)?'"'+string.replace(escapeable,function(a){var c=meta[a];if(typeof c==='string'){return c;}
c=a.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+
(c%16).toString(16);})+'"':'"'+string+'"';}
function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key);}
if(typeof rep==='function'){value=rep.call(holder,key,value);}
switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}
gap+=indent;partial=[];if(typeof value.length==='number'&&!(value.propertyIsEnumerable('length'))){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null';}
v=partial.length===0?'[]':gap?'[\n'+gap+partial.join(',\n'+gap)+'\n'+mind+']':'['+partial.join(',')+']';gap=mind;return v;}
if(typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==='string'){v=str(k,value,rep);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}else{for(k in value){v=str(k,value,rep);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}
v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+mind+'}':'{'+partial.join(',')+'}';gap=mind;return v;}}
return{stringify:function(value,replacer,space){var i;gap='';indent='';if(space){if(typeof space==='number'){for(i=0;i<space;i+=1){indent+=' ';}}else if(typeof space==='string'){indent=space;}}
if(!replacer){rep=function(key,value){if(!Object.hasOwnProperty.call(this,key)){return undefined;}
return value;};}else if(typeof replacer==='function'||(typeof replacer==='object'&&typeof replacer.length==='number')){rep=replacer;}else{throw new Error('JSON.stringify');}
return str('',{'':value});},parse:function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object'){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}
return reviver.call(holder,key,value);}
if(/^[\],:{}\s]*$/.test(text.replace(/\\["\\\/bfnrtu]/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}
throw new SyntaxError('JSON.parse');},quote:quote};}();}
function wing_get_results(optionIds,renderMode,refreshRate){if(refreshRate==false||isNaN(refreshRate)||refreshRate<1000)
return;wingRPC=API.RPC.New("wing_rpc","live_results2");wingRPC.setParameter("optionIds",optionIds);wingRPC.setParameter("renderMode",renderMode);wingRPC.callBack=function(status,responseXML,responseText){var myInterval=window.setInterval(function(){window.clearInterval(myInterval);wingRPC.execute();},refreshRate);}
wingRPC.execute();};function cosas_verdes_location(href){setRelativeHref(href,window.top.frameMain.frameStructureMain.location);};
