/*================ LAST MOD: 2009-11-25 02:36:28am ================*/

/* -----------START: /assets/cssjs/tours/common.js---------*/

/* --------------------------------------------------*/

/*minified*/

function testFields(){var child=document.getElementById("moreUploads");var parent=child.parentNode;var allUploadFields=getElementsByClassName(parent,"input","uploadField");for(var i=0;i<allUploadFields.length;i++){if(allUploadFields[i].value){document.eventmedia.submit();return true;}}
alert("Select at least one image for uploading");return false;}
function addMore(){var child=document.getElementById("moreUploads");var parent=child.parentNode;var allUploadFields=getElementsByClassName(parent,"input","uploadField");var oneUpload=document.createElement("div");oneUpload.className="oneUpload";oneUpload.innerHTML='<input type ="file" class="uploadField" heright="100" name="media'+(allUploadFields.length+1)+'" size=60>';parent.insertBefore(oneUpload,child);}
function changeTabs(obj){var className=obj.className;className=className.replace(/selected/g,'');var objs=getElementsByClassName(obj.parentNode,"li",className);for(var i=0;i<objs.length;i++)
objs[i].className=className;obj.className+=" selected";var id=obj.id.substring(1);document.getElementById("type").value=id;}
function findPosition(elemObj){var position={top:0,left:0};var nodeObj=elemObj;while(nodeObj.tagName!='HTML'){position.top+=nodeObj.offsetTop||0;position.left+=nodeObj.offsetLeft||0;if(nodeObj.offsetParent){nodeObj=nodeObj.offsetParent;}else{break;}}
return position;}
function findSize(elem){if(elem.style.pixelHeight){return{height:elem.style.pixelHeight,width:elem.style.pixelWidth}}
else{return{height:elem.offsetHeight,width:elem.offsetWidth}}}
function posXY(e){var pos={x:0,y:0};if(!e)var e=window.event;if(e.pageX||e.pageY){pos.x=e.pageX;pos.y=e.pageY;}
else if(e.clientX||e.clientY){pos.x=e.clientX+document.body.scrollLeft
+document.documentElement.scrollLeft;pos.y=e.clientY+document.body.scrollTop
+document.documentElement.scrollTop;}
return pos;}
function browserSize(){var browserWidth=0;var browserHeight=0;if(self.innerHeight){browserHeight=self.innerHeight;browserWidth=self.innerWidth;}
if(document.documentElement&&document.documentElement.clientHeight){browserHeight=document.documentElement.clientHeight;browserWidth=document.documentElement.clientWidth;}else if(document.body){browserHeight=document.body.clientHeight;browserWidth=document.body.clientWidth;}
return{width:browserWidth,height:browserHeight}}
function getScrollingPosition(){var x=0;var y=0;if(typeof window.pageYOffset!='undefined'){x=window.pageXOffset;y=window.pageYOffset;}else if(typeof document.documentElement.scrollTop!='undefined'&&document.documentElement.scrollTop>0){x=document.documentElement.scrollLeft;y=document.documentElement.scrollTop;}else if(typeof document.body.scrollTop!='undefined'){x=document.body.scrollLeft;y=document.body.scrollTop;}
return{left:x,top:y}}
function displayDate(){if(document.getElementById("drop_date_container").style.display!="block"){var searchBox=document.getElementById("SearchBarToursRight");var position=findPosition(searchBox);var size=findSize(searchBox);var drop=document.getElementById("drop_date_container");drop.style.display="block";drop.style.position="absolute";drop.style.zIndex="100";drop.style.top=position['top']+size['height']+"px";drop.style.left=position['left']+"px";firstTime=0;initCalendar();setTimeout("document.onclick=addListenerDrop",0);}}
function addListenerDrop(e){var target=(e&&e.target)||(event&&event.srcElement);var parent=checkParentInside(target,"searchinputRight");if(parent)parent=checkParentInside(target,"drop_date_container");if(parent){closeOptionsDate();}}
function closeOptionsDate(){document.getElementById("drop_date_container").style.display="none";document.onclick="";}
function showCalendar(obj){document.onclick="";if(document.getElementById("overMap")){var overMap=document.getElementById("overMap");overMap.parentNode.removeChild(overMap);}
var id=obj.id;id=id.substring(1);var objPos=findPosition(obj);var objSize=findSize(obj);var left=objPos['left']+objSize['width'];var calendarDiv=document.getElementById("cal1Container");calendarDiv.style.left=left+5+"px";calendarDiv.style.top=objPos['top']+objSize['height']+5+"px";calendarDiv.style.display="block";var date_type_selected=whatChecked();if(date_type_selected=="sbt_upcoming"&&obj.id=="_from_date")hideCalendar();if(date_type_selected=="sbt_upcoming"&&obj.id=="_to_date"){var today=getToday();var strToday=today['month']+"/"+today['day']+"/"+today['year'];YAHOO.example.calendar.cal1.cfg.setProperty("mindate");YAHOO.example.calendar.cal1.cfg.setProperty("maxdate");YAHOO.example.calendar.cal1.reset();YAHOO.example.calendar.cal1.cfg.setProperty("mindate",strToday);YAHOO.example.calendar.cal1.cfg.setProperty("pagedate",today['month']+"/"+today['year']);YAHOO.example.calendar.cal1.render();}
if(date_type_selected=="sbt_archive"&&obj.id=="_to_date")hideCalendar();if(date_type_selected=="sbt_archive"&&obj.id=="_from_date"){var today=getToday();var strToday=today['month']+"/"+today['day']+"/"+today['year'];YAHOO.example.calendar.cal1.cfg.setProperty("mindate");YAHOO.example.calendar.cal1.cfg.setProperty("maxdate");YAHOO.example.calendar.cal1.reset();YAHOO.example.calendar.cal1.cfg.setProperty("maxdate",strToday);YAHOO.example.calendar.cal1.cfg.setProperty("pagedate",today['month']+"/"+today['year']);YAHOO.example.calendar.cal1.render();}
if(date_type_selected=="sbt_range"){var today=getToday();YAHOO.example.calendar.cal1.cfg.setProperty("mindate");YAHOO.example.calendar.cal1.cfg.setProperty("maxdate");YAHOO.example.calendar.cal1.reset();YAHOO.example.calendar.cal1.cfg.setProperty("pagedate",today['month']+"/"+today['year']);YAHOO.example.calendar.cal1.render();}
if(document.getElementById("mapbox")){var mapBox=document.getElementById("mapbox");var mapPos=findPosition(mapBox);var mapSize=findSize(mapBox);var arrBody=document.getElementsByTagName("body");var overMap=document.createElement("div");overMap.id="overMap";overMap.style.position="absolute";overMap.style.top=mapPos['top']+"px";overMap.style.left=mapPos['left']+"px";overMap.style.width=mapSize['width']+"px";overMap.style.height=mapSize['height']+"px";overMap.style.background="white";overMap.style.opacity=0;overMap.style.filter="alpha(opacity=0)";overMap.style.zIndex=10;arrBody[0].appendChild(overMap);}
document.getElementById("from_to").value=id;captureDays();setTimeout("document.onclick = checkInside",100);}
function captureDays(){YAHOO.example.calendar.cal1.selectEvent.subscribe(selectDate);}
function selectDate(){var arrDates=YAHOO.example.calendar.cal1.getSelectedDates();for(var i=0;i<arrDates.length;i++)
var date=arrDates[0];var displayMonth=date.getMonth()+1;var displayYear=date.getFullYear();var displayDate=date.getDate();var from_to=document.getElementById("from_to").value;document.getElementById(from_to).value=displayMonth+"/"+displayDate+"/"+displayYear;setTimeout("hideCalendar()",200);if(from_to=="to_date"){var startDate=document.getElementById("from_date").value;}
if(from_to=="from_date"){var startDate=document.getElementById("to_date").value;}
if(startDate.indexOf("m")>=0){document.getElementById("from_date").value=document.getElementById(from_to).value;}else{var tempPos=startDate.indexOf("/");var startMonth=startDate.substring(0,tempPos);startDate=startDate.substring(tempPos+1);tempPos=startDate.indexOf("/",tempPos);var startDay=startDate.substring(0,tempPos);startDate=startDate.substring(tempPos+1);var startYear=startDate;}
if(from_to=="to_date"){if((startYear>displayYear)||(startYear<=displayYear&&startMonth>displayMonth)||(startYear<=displayYear&&startMonth==displayMonth&&startDay>displayDate))document.getElementById("from_date").value=displayMonth+"/"+displayDate+"/"+displayYear;}
if(from_to=="from_date"){if((startYear<displayYear)||(startYear>=displayYear&&startMonth<displayMonth)||(startYear>=displayYear&&startMonth==displayMonth&&startDay<displayDate))
document.getElementById("to_date").value=displayMonth+"/"+displayDate+"/"+displayYear;}
setTimeout("document.onclick=addListenerDrop",500);}
function showRange(id){document.getElementById(id).style.display="block";initCalendar();hideCalendar();}
function hideRange(id){document.getElementById(id).style.display="none";hideCalendar();initCalendar();hideCalendar();}
function hideCalendar(){document.getElementById('cal1Container').style.display='none';if(document.getElementById("overMap")){var overMap=document.getElementById("overMap");overMap.parentNode.removeChild(overMap);}}
function whatChecked(){var date_type=document.getElementById("search_artist").getElementsByTagName("input");for(var i=0;i<date_type.length;i++)
if(date_type[i].checked)var date_type_selected=date_type[i].id;if(date_type_selected)return date_type_selected;else return false;}
function initCalendar(){var day_mili=86400000;var date_type_selected=whatChecked();var today=getToday();var todayObj=new Date();var time_mili=todayObj.getTime();if(date_type_selected=="sbt_upcoming"){document.getElementById("from_date").value=today['month']+"/"+today['day']+"/"+today['year'];document.getElementById("to_date").value="mm/dd/yy";}
if(date_type_selected=="sbt_archive"){time_mili=time_mili-(day_mili*14);todayObj.setTime(time_mili);var twoWeeksPast=getStringDate(todayObj);document.getElementById("to_date").value=today['month']+"/"+today['day']+"/"+today['year'];document.getElementById("from_date").value=twoWeeksPast['month']+"/"+twoWeeksPast['day']+"/"+twoWeeksPast['year'];}
if(date_type_selected=="sbt_range"){time_mili=time_mili-(day_mili*14);todayObj.setTime(time_mili);var twoWeeksLast=getStringDate(todayObj);document.getElementById("from_date").value=twoWeeksLast['month']+"/"+twoWeeksLast['day']+"/"+twoWeeksLast['year'];todayObj=new Date();time_mili=todayObj.getTime();time_mili=time_mili+(day_mili*14);todayObj.setTime(time_mili);var twoWeeksNext=getStringDate(todayObj);document.getElementById("to_date").value=twoWeeksNext['month']+"/"+twoWeeksNext['day']+"/"+twoWeeksNext['year'];}}
function getToday(){var today=new Date();var todayDay=today.getDate();var todayMonth=today.getMonth()+1;var todayYear=today.getFullYear();today={'day':todayDay,'month':todayMonth,'year':todayYear};return today;}
function getStringDate(dateObj){var day=dateObj.getDate();var month=dateObj.getMonth()+1;var year=dateObj.getFullYear();var dateStr={'day':day,'month':month,'year':year};return dateStr;}
function checkInside(e){var target=(e&&e.target)||(event&&event.srcElement);var obj=document.getElementById('cal1Container');var parent=checkParentInside(target,'cal1Container');if(parent){var calendarON=obj.style.display;obj.style.display='none';document.onclick="";if(document.getElementById("overMap")){var overMap=document.getElementById("overMap");overMap.parentNode.removeChild(overMap);}
if(document.getElementById("drop_date_container")&&calendarON=="block"){document.getElementById("drop_date_container").style.display="none";}}}
function checkParentInside(t,source){while(t.parentNode){if(t==document.getElementById(source)){return false}
t=t.parentNode;}
return true}
function getElementsByClassName(oElm,strTagName,strClassName){var arrElements=(strTagName=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(strTagName);var arrReturnElements=new Array();strClassName=strClassName.replace(/\-/g,"\\-");var oRegExp=new RegExp("(^|\\s)"+strClassName+"(\\s|$)");var oElement;for(var i=0;i<arrElements.length;i++){oElement=arrElements[i];if(oRegExp.test(oElement.className)){arrReturnElements.push(oElement);}}
return(arrReturnElements)}
function suggestTerm(textObj,suggestUrl,typeObj){var type;if(typeObj)type=document.getElementById(typeObj).value;switch(type){case'city':suggestCity(textObj,suggestUrl,2,10,true,null,true);break;case'venue':suggestVenue(textObj,suggestUrl,2,10,true,null,true);break;case'artist':suggestEvent(textObj,suggestUrl,2,10,true,null,true);break;}}
function focusMap(node){var scroll=topOfMap-50;window.scrollTo(0,scroll);resizeMap();}
function handleMapScroll(e){if(e){if(e.preventDefault){e.preventDefault();e.stopPropagation();}else{e.returnValue=false;e.cancelBubble=true;}}
return false;}
function showMarker(markerKey){with(top.frames['gmap']){if(typeof markers[markerKey]){GEvent.trigger(markers[markerKey],"click");}}}
function showMissing(){with(top.frames['gmap']){closeOverlay();}}
var currentResult;function highlightResult(node){var id=node.id;id=id.substring(5);document.getElementById("itemp"+id).className="sr_item sr_item_on";clearResult();currentResult=document.getElementById("itemp"+id);}
function clearResult(){if(currentResult){currentResult.className='sr_item';}}
function ResultManager(){this.parent;this.results=[];this.appendResult=function(node,hasCoords,markerKey){if(hasCoords){node.onclick=function(){focusMap(this);showMarker(markerKey);highlightResult(node);return false;}
this.results.push(node);}else{node.onclick=function(){focusMap(this);showMissing();highlightResult(node);return false;}}}
this.init=function(parent,appendClassName,missingClassName){this.parent=parent;if(resultParent=document.getElementById(this.parent)){resultNodes=getElementsByClassName(resultParent,"a","showMap");for(var i=0;i<resultNodes.length;i++){if(resultNodes[i].className){appendNode=missingCoords=false;var resultClass=resultNodes[i].className.split(' ');for(var j in resultClass){if(resultClass[j]==appendClassName){appendNode=true;}else if(resultClass[j]==missingClassName){missingCoords=true;}}
if(appendNode){var markerKey=resultNodes[i].id.substring(5);this.appendResult(resultNodes[i],!missingCoords,markerKey);}}}}}}
function resizeImage(reff,to_width,to_height){var width,height,to_width,to_height;width=reff.width;height=reff.height;if(width>0){if(width>height){reff.height=to_height;img_ratio=(to_height/height);new_width=(width*img_ratio);reff.width=new_width;reff.style.marginLeft=(to_width-new_width)/2+"px";}else{reff.width=to_width;img_ratio=(to_width/width);new_height=(height*img_ratio);reff.height=new_height;reff.style.marginTop=(to_height-new_height)/2+"px";}}else{reff.width=to_width;reff.height=to_height;}}
function showFeatImage(reff,featimgnr,title,commentsnr,height){var imgHolder=document.getElementById('feat_img_holder');var imgHolderArrow=document.getElementById('feat_img_holder_arrow');var featImg=document.getElementById('feat_image_'+featimgnr);var comments_text="";var reffPos=findPosition(reff);var reff_left=reffPos['left'];var reff_top=reffPos['top'];var arrow_left=(reff_left-18);var arrow_top=(reff_top+height/2-10);imgHolderArrow.style.left=arrow_left+"px";imgHolderArrow.style.top=arrow_top+"px";imgHolder.innerHTML="<div class='image'><img src='"+featImg.src+"' id='featImage' /></div><div class='title'>"+title+"</div>";imgHolder.style.top=(arrow_top-((featImg.height)/2)-10)+"px";imgHolder.style.left=(arrow_left-(featImg.width+20))+"px";imgHolder.style.width=(featImg.width+20)+"px";document.getElementById('feat_image').style.display="block";}
function hideFeatImage(){document.getElementById('feat_image').style.display="none";}
/* --------------------------------------------------*/

/* -----------START: /assets/cssjs/tours/details.js---------*/

/* --------------------------------------------------*/

/*minified*/

function toggleVideoType(){var e=document.getElementById("videoType");if(!e)return;if(e.value=='upload'){e.value='embed';e=document.getElementById('upl_title');if(e)e.style.display="none";e=document.getElementById('upl_file');if(e)e.style.display="none";e=document.getElementById('embed_title');if(e)e.style.display="block";e=document.getElementById('alt_embed');if(e)e.style.display="block";e=document.getElementById('menu_vt_type');e.innerHTML='Upload a Video';e=document.getElementById('embed_description');if(e)e.style.display="block";}else{e.value='upload';e=document.getElementById('upl_title');if(e)e.style.display="block";e=document.getElementById('upl_file');if(e)e.style.display="block";e=document.getElementById('embed_title');if(e)e.style.display="none";e=document.getElementById('alt_embed');if(e)e.style.display="none";e=document.getElementById('menu_vt_type');e.innerHTML='Embed a Video';e=document.getElementById('embed_description');if(e)e.style.display="none";}}
function openExisting(){document.getElementById("uploadMediaPictures").style.display="none";document.getElementById("assocMediaPictures").style.display="block";var url='/concerts/addposts/?size="mob"';window.open(url,"TEST",'width=525,height=500,scrollbars=1,resizable=1,location=0');}
function cancelAssoc(){document.getElementById("assocMediaPictures").style.display="none";document.getElementById("uploadMediaPictures").style.display="block";}
function saveAssoc(){var imgAssoc=document.getElementById("assocpics").getElementsByTagName("img");var len=imgAssoc.length;var eventId=document.getElementById("eventID").value;var param="";for(var i=0;i<len;i++){if(i<len-1)param+=imgAssoc[i].id.substring(10)+"|";else param+=imgAssoc[i].id.substring(10);}
dojo.io.bind({'url':'/interface/post/events/mediaassoc/','method':'GET','content':{'eventId':eventId,'postId':param},'mimetype':'text/json','load':function(tp,json,e){},'error':function(tp,json,e){alert('There was an error updating your post. Please try again.');return;}});alert(param);}
function addPic(entry_id,thumbnailobj,windref){if(!entry_id)return;if(!thumbnailobj)return;if(!thumbnailobj.src)return;var vals=null;vals=(findObj("assoc_entries").value.split(","));for(i=0;i<vals.length;i++){if(vals[i]==entry_id){if(windref){if(windref.alert)
windref.alert("You've already added that photo");}else{alert("You've already added that photo");}
return;}}
vals[vals.length]=entry_id;findObj("assoc_entries").value=vals.join(",");vals=0;var node=document.createElement("span");node.id="img"+entry_id;var ihtml='<img id="img_added_'+entry_id+'" src="'+thumbnailobj.src+'" border="0" />';ihtml='<a class="thumbAssoc" href="#" onclick="removePic(\''+entry_id+'\');return false;">'+ihtml+'</a>';node.innerHTML=ihtml;document.getElementById("assocpics").appendChild(node);if(!windref)return;if(!windref.alert)return
resizeImage(document.getElementById("img_added_"+entry_id),86,86);windref.alert("The photo was added");}
function removePic(entry_id){if(!entry_id)return;if(!findObj("img"+entry_id))return;if(!confirm("Are you sure you want to remove this?"))return;var vals=0;vals=findObj("assoc_entries").value.split(",");for(i=0;i<vals.length;i++){if(vals[i]==entry_id){vals[i]=null;}}
findObj("assoc_entries").value=vals.join(",");document.getElementById("assocpics").removeChild(document.getElementById("img"+entry_id));}
function cancelUpload(formId){document.getElementById(formId).reset();document.getElementById("uploadVideoForm").reset();document.getElementById("media_pictures").style.display="none";document.getElementById("media_videos").style.display="none";document.getElementById("media_little").style.display="block";}
function showLimitedArtists(){document.getElementById("limitedArtists").style.display="block";document.getElementById("fullArtists").style.display="none";}
function showAllArtists(){document.getElementById("limitedArtists").style.display="none";document.getElementById("fullArtists").style.display="block";}
function startUploadPicture(){document.getElementById("media_videos").style.display="none";document.getElementById("media_little").style.display="none"
document.getElementById("media_pictures").style.display="block";}
function startUploadVideo(){document.getElementById("media_pictures").style.display="none";document.getElementById("media_little").style.display="none";document.getElementById("media_videos").style.display="block";}
function changeTab(type){var pictures=new Array("tab_recent_pictures","tab_event_pictures","recent_photos","event_photos");var videos=new Array("tab_recent_videos","tab_event_videos","recent_videos","event_videos");var comments=new Array("tab_event_comments","tab_event_going","tab_event_want","tab_event_not","all_attends","going","want","not");switch(type){case"recent_pictures":document.getElementById(pictures[0]).className="selected";document.getElementById(pictures[1]).className="";document.getElementById(pictures[2]).style.display="block";document.getElementById(pictures[3]).style.display="none";break;case"event_pictures":document.getElementById(pictures[0]).className="";document.getElementById(pictures[1]).className="selected";document.getElementById(pictures[2]).style.display="none";document.getElementById(pictures[3]).style.display="block";break;case"recent_videos":document.getElementById(videos[0]).className="selected";document.getElementById(videos[1]).className="";document.getElementById(videos[2]).style.display="block";document.getElementById(videos[3]).style.display="none";break;case"event_videos":document.getElementById(videos[0]).className="";document.getElementById(videos[1]).className="selected";document.getElementById(videos[2]).style.display="none";document.getElementById(videos[3]).style.display="block";break;case"event_comments":for(i=0;i<=3;i++){document.getElementById(comments[i]).className="";}
document.getElementById(comments[0]).className="selected";for(i=4;i<=7;i++){document.getElementById(comments[i]).style.display="none";}
document.getElementById(comments[4]).style.display="block";break;case"event_going":for(i=0;i<=3;i++){document.getElementById(comments[i]).className="";}
document.getElementById(comments[1]).className="selected";for(i=4;i<=7;i++){document.getElementById(comments[i]).style.display="none";}
document.getElementById(comments[5]).style.display="block";break;case"event_want":for(i=0;i<=3;i++){document.getElementById(comments[i]).className="";}
document.getElementById(comments[2]).className="selected";for(i=4;i<=7;i++){document.getElementById(comments[i]).style.display="none";}
document.getElementById(comments[6]).style.display="block";break;case"event_not":for(i=0;i<=3;i++){document.getElementById(comments[i]).className="";}
document.getElementById(comments[3]).className="selected";for(i=4;i<=7;i++){document.getElementById(comments[i]).style.display="none";}
document.getElementById(comments[7]).style.display="block";break;}}
function showUploadBox(type)
{if(!isSignedIn()){modalLogin.open("You must sign in to post a "+type);return false;}
document.getElementById('embed_title').style.display='none';document.getElementById('alt_embed').style.display='none';document.getElementById('videoType').value='upload';document.getElementById('menu_vt_type').innerHTML='Embed a Video';document.getElementById('embed_description').style.display="none";document.getElementById('menu_pic').className='button';document.getElementById('menu_vid').className='button';try{document.getElementById('post_file').value="";document.getElementById('title').value="";document.getElementById('desc').value="";document.getElementById('vt_title').style.display='none';document.getElementById('vt').style.display='none';document.getElementById('buttons').style.display="block";document.getElementById('pt').style.display="none";document.getElementById('vt').style.display="none";document.getElementById('vt_title').style.display="none";switch(type)
{case"picture":document.getElementById('upl_title').innerHTML='Upload Picture: ';document.getElementById('upl_title').style.display='block';document.getElementById('upl_file').style.display='block';document.getElementById('menu_pic').className='button_white';document.getElementById('pt').style.display="block";document.getElementById('vt_title').style.display="block";break;case"video":document.getElementById('upl_title').innerHTML='Upload Video: ';document.getElementById('upl_title').style.display='block';document.getElementById('upl_file').style.display='block';document.getElementById('menu_vid').className='button_white';document.getElementById('vt_title').style.display='block';document.getElementById('vt').style.display='block';break;}
document.getElementById('quick_post').style.display="block";}catch(err){}
document.getElementById('cont_menu').style.display='none';document.getElementById('upload_box').style.display='block';}
/* --------------------------------------------------*/

/* -----------START: /assets/cssjs/user_status.js---------*/

/* --------------------------------------------------*/

/*minified*/

function userStatus(statusType,statusDefaultTxt,otherStatusTypeTxt){this.thereIsAnother=false;this.statusType=statusType;this.statusDefaultTxt=statusDefaultTxt;this.otherStatusTypeTxt=otherStatusTypeTxt;this.clearStatus=function(){this.testOther();this.statusDisplayFlip("edit");dojo.byId("userhomepage_status_"+this.statusType).value=this.statusDefaultTxt;setMiscConfig('userhomepage_status_message',"");if(this.thereIsAnother)this.handleOthers("clear");return 1;}
this.editToggle=function(editDivId,editModuleName,unset){var editDiv=dojo.byId(editDivId);if(editDiv){editDiv.style.display=(editDiv.style.display=="none")?"block":"none";if(typeof(unset)!="undefined"){PageModuleManagerObj.unsetModuleInEditmode(editModuleName);}}}
this.getOthersDetails=function(){this.otherStatusObj=eval(this.otherStatus);this.otherStatusType=this.otherStatusObj.statusType;this.otherStatusEl=dojo.byId("userhomepage_statusupdate_status_text_"+this.otherStatusType);this.otherStatusElParent=this.otherStatusEl.parentNode;this.currentStatusEl=dojo.byId("userhomepage_statusupdate_status_text_"+this.statusType);}
this.handleOthers=function(type){this.getOthersDetails();if(type&&type=="clear"){this.statusDisplayFlip("edit",this.otherStatusType);dojo.byId("userhomepage_status_"+this.otherStatusType).value=this.otherStatusObj.statusDefaultTxt;}else{if(this.otherStatusElParent&&this.otherStatusElParent.style.display=="none"){this.otherStatusElParent.style.display="block";dojo.byId("userhomepage_statusupdate_edit_"+this.otherStatusType).style.display="none";}
this.otherStatusEl.innerHTML=this.currentStatusEl.innerHTML;}}
this.keyPress=function(e){if(e.keyCode==13){this.postStatus();}}
this.postStatus=function(def_text){this.testOther();reloadAdFrames();var userhomepage_status=dojo.byId("userhomepage_status_"+this.statusType);if(userhomepage_status.value.replace(/^\s+|\s+$/g,'')==''||userhomepage_status.value==def_text){userhomepage_status.value=def_text;return false;}
var userhomepage_status_value=escape(userhomepage_status.value);dojo.io.bind({"mimetype":"text/html","url":"/interface/post/setstatus/?status="+userhomepage_status_value,"load":this.postStatusReply});setMiscConfig('userhomepage_status_message',userhomepage_status_value);dojo.byId("userhomepage_statusupdate_status_text_"+this.statusType).innerHTML=unescape(userhomepage_status_value);if(this.thereIsAnother)this.handleOthers();this.statusDisplayFlip();return 1;}
this.postStatusReply=function(t,data,e){var retdata=eval('('+data+')');this.statusDisplayFlip();return 1;}
this.statusBlur=function(e,ele){if(ele.value==''){if(this.clickModeStatus){this.statusDisplayFlip();this.clickModeStatus=false;}else{ele.value=this.statusDefaultTxt;}}}
this.statusClick=function(e){var userhomepage_status=dojo.byId("userhomepage_status_"+this.statusType);this.clickModeStatus=true;userhomepage_status.value="";this.statusDisplayFlip("edit");userhomepage_status.focus();}
this.statusDisplayFlip=function(mode,target){var statusTarget=(target)?target:this.statusType;if(mode=="edit"){dojo.byId("userhomepage_statusupdate_edit_"+statusTarget).style.display="block";dojo.byId("userhomepage_statusupdate_status_"+statusTarget).style.display="none";}else{dojo.byId("userhomepage_statusupdate_edit_"+statusTarget).style.display="none";dojo.byId("userhomepage_statusupdate_status_"+statusTarget).style.display="block";}}
this.testOther=function(){if(this.otherStatusTypeTxt){this.otherStatus="userStatus"+this.otherStatusTypeTxt;this.otherInput="userhomepage_status_"+this.otherStatusTypeTxt.toLowerCase();if(navigator.userAgent.indexOf("MSIE")!=-1){if(dojo.byId(this.otherInput))this.thereIsAnother=true;}else{if(dojo.byId(this.otherInput)&&typeof(dojo.byId(this.otherInput))=="object")this.thereIsAnother=true;}}}}
/* --------------------------------------------------*/
