/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 4.1.7
|| # ---------------------------------------------------------------- # ||
|| # Copyright �2000-2011 vBulletin Solutions Inc. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/
var class_map_string='{".moduleinactive_bg":{"bc":"moduleinactive_border","c":"moduleinactive_text_color", "b":"moduleinactive_background"},".userprof_underline":{"bc":"module_border"},".userprof":{"f":"font_family","fs":"fontsize"},".userprof_title":{"c":"title_text_color"} ,".userprof_module":{"c":"module_text_color",	"b":"module_background"},".userprof_module_border":{"bc":"module_border"},".userprof_module a":{"c":"module_link_color"},".userprof_module a:hover":{"c":"module_link_color"},".userprof_moduleinactive":{"c":"moduleinactive_text_color",	"b":"moduleinactive_background"},".userprof_moduleinactive_border":{"bc":"moduleinactive_border"},".userprof_moduleinactive a":{"c":"moduleinactive_link_color"},".userprof_moduleinactive a:hover":{"c":"moduleinactive_link_color"},".userprof_headers":{"c":"headers_text_color",	"b":"headers_background"},".userprof_headers .postdate .time": {"c":"headers_text_color"},".userprof_headers_border":{"bc":"headers_border"},".userprof_headers a":{"c":"headers_link_color"},".userprof_headers a:hover":{"c":"headers_link_color"},".userprof_content":{"c":"content_text_color",	"b":"content_background",	"bc":"content_border"},".userprof_content a":{"c":"content_link_color"},".userprof_content a:hover":{"c":"content_link_color"},".userprof_content .shade":{"c":"content_text_color"},"dd.userprof_content":{"bc":"content_border",	"c":"content_text_color", "b":"content_background"},"dl.stats dt, #sidebar_container dl.stats, #sidebar_container .blockbody.userprof_content, #sidebar_container .userprof_content .time, .userprof_content .time":{"bc":"content_border",	"c":"content_text_color"},"dd.userprof_module":{"bc":"module_border",	"b":"module_background", "c":"module_text_color"},"dd.userprof_moduleinactive":{"bc":"moduleinactive_border",	"b":"moduleinactive_background", "c":"moduleinactive_text_color"},"dl.tabslight dd.userprof_module a":{"bc":"module_border",	"c":"module_text_color"},"dl.tabslight dd.userprof_module a:hover":{"bc":"module_border",	"c":"module_text_color"},"dl.tabslight dd.userprof_moduleinactive a, dl.tabslight dd.userprof_moduleinactive a:hover":{"bc":"moduleinactive_border",	"c":"moduleinactive_text_color"},"dl.tabslight dd.userprof_content a":{"bc":"content_border",	"c":"content_text_color", "b":"content_background"},"li.userprof_content":{"c":"content_text_color",	"b":"content_background"},".userprof_content_border":{"bc":"content_border"},".userprof_button":{"c":"button_text_color",	"b":"button_background",	"bc":"button_border"},".body_wrapper":{"b":"page_background"},".blogentryhead":{"c": "content_text_color",	"b":"content_background"},".userprof_modborder_fill":{"b":"module_border"},"#sidebar_container .userprof_content .blockrow":{	"c":"content_link_color",	"b":"content_background",	"bc":"content_border"},"#sidebar_container .blocksubhead":{	"c":"moduleinactive_text_color",	"bc":"moduleinactive_border"},".memberprofiletabunder":{"b":"module_background"},"#sidebar_container .time":{"c":"content_text_color"},".time":{"c":"content_text_color"},".pagination span a, .pagination span a.popupctrl":{"c":"moduleinactive_text_color", "b":"moduleinactive_background", "bc":"moduleinactive_border"},".pagination span.selected a, .pagination span.selected a.popupctrl":{"c":"module_text_color", "b":"module_background", "bc":"module_border"},".member_blockrow":{"c":"content_text_color"},".member_summary#sidebar_container": {"c":"moduleinactive_text_color", "b": "moduleinactive_background", "bc": "moduleinactive_border"},"#sidebar_container.member_summary .textcontrol":{"c":"moduleinactive_link_color"},"#sidebar_container a": {"c":"moduleinactive_link_color"},"#sidebar_container a:hover": {"c":"moduleinactive_link_color"},"#sidebar_container .userprof_content a, #sidebar_container .userprof_content a:hover": {"c": "content_link_color"},".profile_editor_border, .profile_content .actionbuttons":{"bc":"headers_border"},".userprof .postbit .postdate .time":{"c":"headers_text_color"},".userprof .postbit .postdate .time a":{"c":"headers_link_color"},".member_content a, .member_content a:hover":{"c":"page_link_color"},".userprof_editor":{"bc":"headers_border"},"#sidebar_container.member_summary .textcontrol a":{"c":"moduleinactive_link_color"},"#sidebar_container.member_summary .textcontrol a:hover":{"c":"moduleinactive_link_color"},".member_content .userprof_headers a": {"c":"headers_link_color"},".pagination span a:hover":{"c":"moduleinactive_text_color","bc":"moduleinactive_border"},".userprof_content .quickedit .blockrow .description":{"c":"content_text_color"},"dl.tabslight dd a, #sidebar_container.member_summary .blocksubhead.smaller, #sidebar_container.member_summary .blockrow":{"f":"font_family","fs":"fontsize"},".textcontrols .textcontrols a, a.textcontrol, #sidebar_container.member_summary .mainblock .usertitle, #sidebar_container .userprof_content a":{"f":"font_family","fs":"fontsize"},".profile_content .blog_stats, .profile_content .blogentrybit .blog_meta":{"f":"font_family","fs":"fontsize"}}';var classmap=false;var colorlist='{"alice blue": [240,248,255],"antique white": [250,235,215],"aqua": [0,255,255],"aquamarine": [127,255,212],"azure": [240,255,255],"beige": [245,245,220],"bisque": [255,228,196],"black": [0,0,0],"blanched almond": [255,235,205],"blue": [0,0,255],"blue violet": [138,43,226],"brown": [165,42,42],"burlywood": [222,184,135],"cadet blue": [95,158,160],"chartreuse": [127,255,0],"chocolate": [210,105,30],"coral": [255,127,80],"cornflower": [100,149,237],"cornsilk": [255,248,220],"crimson": [220,20,60],"cyan": [0,255,255],"dark blue": [0,0,139],"dark cyan": [0,139,139],"dark goldenrod": [184,134,11],"dark gray": [169,169,169],"dark green": [0,100,0],"dark khaki": [189,183,107],"dark magenta": [139,0,139],"dark olive green": [85,107,47],"dark orange": [255,140,0],"dark orchid": [153,50,204],"dark red": [139,0,0],"dark salmon": [233,150,122],"dark sea green": [143,188,143],"dark slate blue": [72,61,139],"dark slate gray": [47,79,79],"dark turquoise": [0,206,209],"dark violet": [148,0,211],"deep pink": [255,20,147],"deep sky blue": [0,191,255],"dim gray": [105,105,105],"dodger blue": [30,144,255],"firebrick": [178,34,34],"floral white": [255,250,240],"forest green": [34,139,34],"fuchsia": [255,0,255],"gainsboro": [220,220,220],"ghost white": [248,248,255],"gold": [255,215,0],"goldenrod": [218,165,32],"gray": [127,127,127],"green": [0,127,0],"green yellow": [173,255,47],"honeydew": [240,255,240],"hot pink": [255,105,180],"indian red": [205,92,92],"indigo": [75,0,130],"ivory": [255,255,240],"khaki": [240,230,140],"lavender": [230,230,250],"lavender blush": [255,240,245],"lawn green": [124,252,0],"lemon chiffon": [255,250,205],"light blue": [173,216,230],"light coral": [240,128,128],"light cyan": [224,255,255],"light goldenrod": [250,250,210],"light gray": [211,211,211],"light green": [144,238,144],"light pink": [255,182,193],"light salmon": [255,160,122],"light sea green": [32,178,170],"light sky blue": [135,206,250],"light slate gray": [119,136,153],"light steel blue": [176,196,222],"light yellow": [255,255,224],"lime": [0,255,0],"lime green": [50,205,50],"linen": [250,240,230],"magenta": [255,0,255],"maroon": [127,0,0],"medium aquamarine": [102,205,170],"medium blue": [0,0,205],"medium orchid": [186,85,211],"medium purple": [147,112,219],"medium sea green": [60,179,113],"medium slate blue": [123,104,238],"medium spring green": [0,250,154],"medium turquoise": [72,209,204],"medium violet red": [199,21,133],"midnight blue": [25,25,112],"mint cream": [245,255,250],"misty rose": [255,228,225],"moccasin": [255,228,181],"navajo white": [255,222,173],"navy": [0,0,128],"old lace": [253,245,230],"olive": [128,128,0],"olive drab": [107,142,35],"orange": [255,165,0],"orange red": [255,69,0],"orchid": [218,112,214],"pale goldenrod": [238,232,170],"pale green": [152,251,152],"pale turquoise": [175,238,238],"pale violet red": [219,112,147],"papaya whip": [255,239,213],"peach puff": [255,218,185],"peru": [205,133,63],"pink": [255,192,203],"plum": [221,160,221],"powder blue": [176,224,230],"purple": [127,0,127],"red": [255,0,0],"rosy brown": [188,143,143],"royal blue": [65,105,225],"saddle brown": [139,69,19],"salmon": [250,128,114],"sandy brown": [244,164,96],"sea green": [46,139,87],"seashell": [255,245,238],"sienna": [160,82,45],"silver": [192,192,192],"sky blue": [135,206,235],"slate blue": [106,90,205],"slate gray": [112,128,144],"snow": [255,250,250],"spring green": [0,255,127],"steel blue": [70,130,180],"tan": [210,180,140],"teal": [0,128,128],"thistle": [216,191,216],"tomato": [255,99,71],"turquoise": [64,224,208],"violet": [238,130,238],"wheat": [245,222,179],"white": [255,255,255],"white smoke": [245,245,245],"yellow": [255,255,0],"yellow green": [154,205,50]}';var colorRGB=YAHOO.lang.JSON.parse(colorlist);var font_pixelsizes=YAHOO.lang.JSON.parse('{"5px": "medium", "6px": "xx-small","7px": "xx-small","8px": "xx-small","9px": "xx-small","10px": "xx-small","11px": "x-small","12px": "x-small","13px": "small","14px": "small","15px": "medium","16px": "medium","17px": "medium","18px": "medium","19px": "large","20px": "large","21px": "large","22px": "large","23px": "large","24px": "x-large","25px": "x-large","26px": "x-large","27px": "x-large","28px": "x-large","29px": "x-large","30px": "x-large","31px": "x-large","32px": "xx-large","33px": "xx-large","34px": "xx-large","35px": "xx-large","36px": "xx-large","37px": "xx-large","38px": "xx-large","39px": "xx-large","40px": "xx-large","41px": "xx-large","42px": "xx-large","43px": "xx-large","44px": "xx-large","45px": "xx-large","46px": "xx-large","47px": "xx-large","48px": "xx-small"}');var font_sizenumbers=YAHOO.lang.JSON.parse('{"1": "xx-small","2": "x-small","3": "small","4": "medium","5": "large","6": "x-large","7": "xx-large"}');var style_unsaved=false;var current_colordiv=null;var current_displaydiv_name=null;var latestColor=false;currentVars=new Array();var colorPicker=false;var pickerDialog=false;YAHOO.namespace("vb.colorpicker");var allowImage=false;var currentVars;var isIE6=false;var isIE=false;var tabcolors=new Array();var assetPicker=false;var alertbox=false;var page_height=false;var close_now=false;var confirmCloseBox=false;var reverting=false;var pagebackgroundcolor=false;var top_offset=false;var current_themeid=false;var theme_unchanged=false;function min(B,A){return B>A?B:A}function setVarsToHex(){for(key in currentVars){if(key.indexOf("color")>-1){currentVars[key]=getHex(currentVars[key])}}}function cleanImageLoc(B){if(B==undefined){return""}var A=new RegExp("<s*script.*>?","i");if(B.match(A)){showMessage("please_no_javascript");return""}var A=new RegExp("vbscripts*:","i");if(B.match(A)){showMessage("please_no_javascript");return""}return B}function reverseSelector(A){if(A.indexOf(" ")>0||(A.charAt(0)!="."&&A.charAt(0)!="#")){return A}var C="";var B=-1;while(A.length>0){B=min(A.indexOf(".",1),A.indexOf("#",1));if(B<0){C=A+C;return C}C=A.substr(0,B)+C;A=A.substr(B)}}function loadClasses(){classmap=YAHOO.lang.JSON.parse(class_map_string);var A="";for(classname in classmap){A=reverseSelector(classname);if(A!=classname){classmap[A]=classmap[classname]}if(classname.indexOf(",")>0){selectors=classname.split(",");if(selectors.length>0){for(i=0;i<selectors.length;i++){thisname=strTrim(selectors[i]);classmap[thisname]=classmap[classname];A=reverseSelector(thisname);if(A!=thisname){classmap[A]=classmap[classname]}}}}}}function getFontDisplayText(A){fontselector=document.getElementById("select_fontsize");if(fontselector==undefined){return A}for(i=0;i<fontselector.length;i++){if(fontselector.options[i].text==A||fontselector.options[i].value==A){return fontselector.options[i].text}}return A}setColor=function(H,A){if(H.responseText!==undefined){var C=YAHOO.lang.JSON.parse(H.responseText);currentVars=C;setVarsToHex();for(varname in C){if(varname=="font_family"){selectlist=document.getElementById("select_font_family");if(selectlist!=undefined){for(i=0;i<selectlist.options.length;i++){if(selectlist.options[i].value.toLowerCase()==C.font_family.toLowerCase()){selectlist.options[i].selected=true;break}}}}else{if(varname=="fontsize"){selectlist=document.getElementById("select_fontsize");if(selectlist!=undefined){try{new_size=false;if(font_pixelsizes[C.fontsize]){new_size=font_pixelsizes[C.fontsize]}else{if(font_sizenumbers[C.fontsize]){new_size=font_pixelsizes[C.fontsize]}else{if(C.fontsize.indexOf("%")>-1){percentage=parseInt(C.fontsize);if(isNaN(percentage)){continue}else{if(percentage<61){new_size="xx-small"}else{if(percentage<76){new_size="x-small"}else{if(percentage<90){new_size="small"}else{if(percentage<121){new_size="medium"}else{if(percentage<150){new_size="large"}else{if(percentage<200){new_size="x-large"}else{new_size="xx-large"}}}}}}}}else{new_size=C.fontsize}}}selected=false;if(new_size){for(i=0;i<selectlist.options.length;i++){if(selectlist.options[i].value.toLowerCase()==new_size){selectlist.options[i].selected=true;selected=true;break}else{selectlist.options[i].selected=false}}}var B=Math.min(selectlist.options.length-1,2);if(!selected){selectlist.options[B].selected=true}}catch(D){}}}else{if(varname.indexOf("background_color")>-1){selector=varname.substr(0,varname.length-6);if(document.getElementById(selector)!=undefined){if(C[selector+"_image"]!==undefined&&C[selector+"_image"]!==""&&C[selector+"_image"]!=="none"){document.getElementById(selector).value=cleanImageLoc(C[selector+"_image"]);if(document.getElementById("colorbox_"+selector)!=undefined){document.getElementById("colorbox_"+selector).style.backgroundColor="#ffffff"}}else{document.getElementById(selector).value=getHex(C[varname]);if(document.getElementById("colorbox_"+selector)!=undefined){document.getElementById("colorbox_"+selector).style.backgroundColor=C[varname]}}}}else{if(document.getElementById(varname)!=undefined){document.getElementById(varname).value=getHex(C[varname]);if(document.getElementById("colorbox_"+varname)!=undefined){document.getElementById("colorbox_"+varname).style.backgroundColor=C[varname]}}}}}}for(var E=0;E<document.styleSheets.length;E++){try{var I=document.styleSheets[E].cssRules?document.styleSheets[E].cssRules:document.styleSheets[E].rules;if(I==null){continue}for(var F=0;F<I.length;F++){if(I[F].selectorText==undefined){continue}var G=classmap[I[F].selectorText.toLowerCase()];if(G!==undefined){if(G.c&&(C[G.c])){I[F].style.color=C[G.c]}if(G.b){I[F].style.backgroundColor="";I[F].style.backgroundImage="none";if(I[F].style.backgroundRepeat!=undefined){I[F].style.backgroundRepeat=""}if(C[G.b+"_image"]){imageLoc=cleanImageLoc(C[G.b+"_image"]);if(imageLoc.toLowerCase().substr(0,4)!=="url("){imageLoc="url("+imageLoc+")"}I[F].style.backgroundImage=imageLoc;if(C[G.b+"_repeat"]&&C[G.b+"_repeat"]!=""&&I[F].style.backgroundRepeat!=undefined){I[F].style.backgroundRepeat=C[G.b+"_repeat"]}}if(C[G.b+"_color"]&&C[G.b+"_color"]!=""){I[F].style.backgroundColor=C[G.b+"_color"]}}if(G.bc&&C[G.bc]){if(C[G.b+"_color"]=="transparent"){I[F].style.borderStyle="none"}else{I[F].style.borderColor=getRGBString(C[G.bc])}}if(G.fs&&C[G.fs]){I[F].style.fontSize=C[G.fs]}if(G.f&&C[G.f]){if(C[G.f].toLowerCase()=="default"){I[F].style.fontFamily=default_font}else{I[F].style.fontFamily=C[G.f]}}}}}catch(D){}}}fontdisplay=document.getElementById("font_display");if(fontdisplay){fontdisplay.innerHTML=getFontDisplayText(C.fontsize);fontdisplay.style.fontSize=C.fontsize;fontdisplay.style.fontFamily=(C.font_family=="default")?default_font:C.font_family}};function getTheme(D,A,C){style_unsaved=(C!==true);var B="./ajax.php?do=gettheme&themeid="+A+"&sessionurl="+SESSIONURL+"&securitytoken="+SECURITYTOKEN+"&ajax=1";YAHOO.util.Connect.asyncRequest("POST",B,{success:setColor,timeout:vB_Default_Timeout,scope:this},"securitytoken="+SECURITYTOKEN);current_themeid=A;theme_unchanged=true}function setDefault(A){getTheme(A,-1)}function revert(B,A){if(style_unsaved){getTheme(B,0,true);if(A){showMessage("profile_reverted_message")}}else{if(A){showMessage("nothing_to_revert")}}}function closeMessage(A){if(alertbox){alertbox.hide()}if(close_now&&A!==null){userprofHideCustomize(null,true);close_now=false}}function closeAndExit(A){userprofHideCustomize(A,true);revert(A,false)}function loadMessage(A){if(A&&A.responseText){if(alertbox){closeMessage(null)}else{alertbox=new YAHOO.widget.Panel("dialog_box",{draggable:true,dragonly:true,modal:true,close:false,height:"13em",width:"20em",y:(100+top_offset)+"px",fixedcenter:true,iframe:true,zIndex:40,buttons:[{text:str_OK,handler:closeMessage}],underlay:"shadow"})}alertbox.setBody(A.responseText);alertbox.render();alertbox.show();document.getElementById("dialog_box").style.top=top_offset+"px";YAHOO.util.Event.on("dialog_okay_button","click",closeMessage)}}function showMessage(B){if(B){if(alertbox){closeMessage(null)}var A="./ajax.php?do=getprofiledialog&phrase="+B+"&securitytoken="+SECURITYTOKEN+"&ajax=1";if(SESSIONURL){A+="&sessionurl="+SESSIONURL}YAHOO.util.Connect.asyncRequest("POST",A,{success:loadMessage,timeout:vB_Default_Timeout,scope:this},"./ajax.php?do=getprofiledialog&phrase="+B+"&securitytoken="+SECURITYTOKEN)}}function closeConfirmCloseBox(A){if(confirmCloseBox){confirmCloseBox.hide()}}function makeConfirmCloseBox(A){if(A&&A.responseText){confirmCloseBox=new YAHOO.widget.Panel("close_dialog_box",{draggable:true,dragonly:true,modal:true,close:false,underlay:"shadow",width:"30em",height:"20em",y:(50+top_offset)+"px",x:"150px",fixedcenter:true,iframe:true});confirmCloseBox.setBody(A.responseText);confirmCloseBox.render();confirmCloseBox.show();YAHOO.util.Event.on("exit_button","click",closeAndExit);YAHOO.util.Event.on("dont_exit_button","click",closeConfirmCloseBox);document.getElementById("close_dialog_box").style.top=top_offset+"px"}}function confirmExit(){if(style_unsaved){if(confirmCloseBox){confirmCloseBox.show()}else{var A="./ajax.php?do=getconfirmclosebox&securitytoken="+SECURITYTOKEN+"&ajax=1";if(SESSIONURL){A+="&sessionurl="+SESSIONURL}YAHOO.util.Connect.asyncRequest("POST",A,{success:makeConfirmCloseBox,timeout:vB_Default_Timeout,scope:this},"do=getconfirmclosebox&securitytoken="+SECURITYTOKEN)}}else{closeAndExit()}}var confirmSave=function(A){close_now=true;showMessage(A.responseText)};var confirmFailed=function(A){showMessage("no_server_response")};var save=function(E,D){var A="";if(parseInt(current_themeid)<1&&theme_unchanged){var C="./ajax.php?do=saveusertheme&deletetheme=1&securitytoken="+SECURITYTOKEN+"&ajax=1"}else{var C="./ajax.php?do=saveusertheme&securitytoken="+SECURITYTOKEN+"&ajax=1&";for(varname in currentVars){if((varname!="userid")&&(varname!="")&&(varname!="")&&(varname!="")){if(currentVars[varname]==""){A+=varname+"=null&"}else{A+=varname+"="+escape(currentVars[varname])+"&"}}}}if(SESSIONURL){C+="&sessionurl="+SESSIONURL}var B=new Array();B.success=confirmSave;B.failure=confirmFailed;B.timeout=vB_Default_Timeout;if(alertbox){closeMessage(E)}YAHOO.util.Connect.asyncRequest("POST",C,B,A+"securitytoken="+SECURITYTOKEN);style_unsaved=false;revert(E,false)};var saveAsDefault=function(E,D){var A="";if(!confirm(confirm_sitedefault_save)){return }var C="./ajax.php?do=saveusertheme&securitytoken="+SECURITYTOKEN+"&ajax=1&saveasdefault=1&";for(varname in currentVars){if((varname!="userid")&&(varname!="")&&(varname!="")&&(varname!="")){if(currentVars[varname]==""){A+=varname+"=null&"}else{A+=varname+"="+escape(currentVars[varname])+"&"}}}if(SESSIONURL){C+="&sessionurl="+SESSIONURL}var B=new Array();B.success=confirmSave;B.failure=confirmFailed;B.timeout=vB_Default_Timeout;if(alertbox){closeMessage(E)}YAHOO.util.Connect.asyncRequest("POST",C,B,A+"securitytoken="+SECURITYTOKEN);revert(D,false);style_unsaved=false};function stripSpaces(A){for(i=A.length-1;i>=0;i--){if(A.charAt(i)==" "){A=(i==0?" ":A.substr(0,i))+(i==A.length?"":A.substr(i+1))}}return A}function strTrim(A){while(A.charAt(0)==" "){A=A.substr(1)}while(A.charAt(A.length-1)==" "){A=A.substr(0,A.length-1)}return A}function getValidColor(E,C){if(E==null){return"#ffffff"}try{E=strTrim(E);if(E==""){return false}}catch(D){}try{if(colorRGB[E.toLowerCase()]!==undefined){return getHex(colorRGB[E.toLowerCase()])}}catch(D){}if((E.length==3)&&(E[0]!==undefined)&&(E[1]!==undefined)&&(E[2]!==undefined)&&E[0]>=0&&E[1]>=0&&E[2]>=0&&E[0]<256&&E[1]<256&&E[2]<256){return getHex(E)}if((E.indexOf("/")>=0)&&C){return E}if(E.toLowerCase()=="transparent"){return"transparent"}var A=new RegExp("^#?([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?$","g");if(E.match(A)){A=E.match(A)[0];if(A.charAt(0)!="#"){A="#"+A}return A}E=stripSpaces(E);if(E.toLowerCase().substr(0,4)=="rgb("){var B=E.toLowerCase().substr(4);if(B.charAt(B.length-1)!=")"){return false}B=B.substr(0,B.length-1);B=B.split(",");if((B.length==3)&&(parseInt(B[0])>=0)&&(parseInt(B[0])<=256)&&(parseInt(B[1])>=0)&&(parseInt(B[1])<=256)&&(parseInt(B[2])>=0)&&(parseInt(B[2])<=256)){return E}}return false}function setColorFromEdit(C,B){var A=document.getElementById(B);if(A==undefined||A.value==undefined){return false}currentVars.themeid=false;if(A.value.toLowerCase().indexOf("/")>-1||A.value.toLowerCase().indexOf("attachment.php?")>-1||A.value.toLowerCase().indexOf("picture.php?")>-1){if(B.indexOf("background")==-1){A.value=currentVars[B];return }noJsLoc=cleanImageLoc(A.value);if(A.value!=noJsLoc){if(currentVars[B]!=undefined){A.value=currentVars[B]}else{if((currentVars[B+"_image"]!=undefined)&&(currentVars[B+"_image"]!="none")&&(currentVars[B+"_image"])!=""){A.value=currentVars[B+"_image"]}else{if(currentVars[B+"_color"]!=undefined){A.value=currentVars[B+"_color"]}else{A.value="#ffffff"}}}}setClassColor(B,null,A.value,false)}else{validColor=getValidColor(A.value,false);if(!validColor){if(currentVars[B]!=undefined){validColor=currentVars[B]}else{if((currentVars[B+"_image"]!=undefined)&&(currentVars[B+"_image"]!="none")&&(currentVars[B+"_image"])!=""){validColor=currentVars[B+"_image"]}else{if(currentVars[B+"_color"]!=undefined){validColor=currentVars[B+"_color"]}else{validColor="#ffffff"}}}A.value=validColor;showMessage("not_a_valid_color")}setClassColor(B,validColor,null,false)}}function isValidColor(B){if(B==undefined||B==null||strTrim(B)==""){return false}try{B=strTrim(B);B=B.toLowerCase()}catch(C){return false()}try{if(B=="transparent"||colorRGB[B]!==undefined){return true}}catch(C){}if(B.indexOf("url")>-1||(B.indexOf("/")>=0)){return false}var A=new RegExp("^#?([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?$","g");if(B.match(A)){return true}B=stripSpaces(B);if(B.toLowerCase().substr(0,4)=="rgb("){tmpcolor=B.toLowerCase().substr(4);if(tmpcolor.charAt(tmpcolor.length-1)!=")"){return false}tmpcolor=tmpcolor.substr(0,tmpcolor.length-1);tmpcolor=tmpcolor.split(",");if((tmpcolor.length==3)&&(parseInt(tmpcolor[0])>=0)&&(parseInt(tmpcolor[0])<=256)&&(parseInt(tmpcolor[1])>=0)&&(parseInt(tmpcolor[1])<=256)&&(parseInt(tmpcolor[2])>=0)&&(parseInt(tmpcolor[2])<=256)){return true}}return false}function setClassColor(D,C,B,A){classValues=new Array();currentVars.themeid=false;if(C!==""&&C!==null){C=getValidColor(C,true)}for(varname in classmap){for(type in classmap[varname]){if(classmap[varname][type]==D){classValues[varname]=type;if((C!="none")&&(B==null||B=="")){displayDivName="colorbox_"+D;if(document.getElementById(displayDivName)!==undefined&&isValidColor(C)){document.getElementById(displayDivName).style.backgroundColor=C}}}}}if(currentVars[D]!==undefined){if(getHex(currentVars[D])!=getHex(C)){style_unsaved=true;theme_unchanged=false;currentVars[D]=getHex(C)}}if(currentVars[D+"_image"]!==undefined&&B){if(currentVars[D+"_image"]!=B){style_unsaved=true;theme_unchanged=false;currentVars[D+"_image"]=B}}if(currentVars[D+"_color"]!==undefined&&C){if(getHex(currentVars[D+"_color"])!=getHex(C)){style_unsaved=true;theme_unchanged=false;currentVars[D+"_color"]=getHex(C)}if(currentVars[D+"_image"]!=""){style_unsaved=true;currentVars[D+"_image"]=""}}if(currentVars[D+"_repeat"]!==undefined){if(A){if(currentVars[D+"_repeat"]!=A){style_unsaved=true;theme_unchanged=false;currentVars[D+"_repeat"]=A}}else{A=currentVars[D+"_repeat"]}}for(var F=0;F<document.styleSheets.length;F++){try{var I=document.styleSheets[F].cssRules?document.styleSheets[F].cssRules:document.styleSheets[F].rules;if(I==null){continue}for(var G=0;G<I.length;G++){if(I[G].selectorText==undefined){continue}var H=classValues[I[G].selectorText.toLowerCase()];if(H!==undefined){switch(H){case"b":if(B){if(B.toLowerCase().substr(0,4)!="url("){B="url("+B+")"}I[G].style.backgroundImage=B;if(A&&(A!="")){try{if(I[G].style.backgroundRepeat!=undefined){I[G].style.backgroundRepeat=A}}catch(E){}}}else{I[G].style.backgroundImage="none"}if(C){I[G].style.backgroundColor=C}break;case"bc":I[G].style.borderColor=C;break;case"f":I[G].style.fontFamily=value;break;default:I[G].style.color=C}}}}catch(E){}}}function getRGBString(B){if(typeof B=="undefined"||B==null){return"rgb(127,127,127)"}B=stripSpaces(B);if(B.toLowerCase().substr(0,4)=="rgb("){return B.toLowerCase()}var A=getRGB(B);if(A.r!==undefined&&A.g!==undefined&&A.b!==undefined){return"rgb("+A.r+","+A.g+","+A.b+")"}else{return"rgb("+A.join(",")+")"}}function getHex(B){if(typeof B=="undefined"||B==null){return"#ffffff"}if((B!==undefined)&&(B[0]!==undefined)&&(B[1]!==undefined)&&(B[2]!==undefined)&&B[0]>=0&&B[1]>=0&&B[2]>=0&&B[0]<256&&B[1]<256&&B[2]<256){return"#"+YAHOO.util.Color.rgb2hex(B).toLowerCase()}try{if(B.charAt(0)=="#"&&B.length==7){return B}}catch(A){}try{if(B.length==6){if(parseInt("#"+B,16)!==NaN){return"#"+B}}}catch(A){}try{try{B=strTrim(B)}catch(A){}B=B.toLowerCase();if(B=="transparent"||B=="inherit"){return"transparent"}}catch(A){}try{if(colorRGB[B.toLowerCase()]!==undefined){colorin=colorRGB[B.toLowerCase()]}if(B.r!==undefined&&B.g!==undefined&&B.b!==undefined){return"#"+YAHOO.util.Color.dec2hex(B.r)+YAHOO.util.Color.dec2hex(B.g)+YAHOO.util.Color.dec2hex(B.b)}}catch(A){}try{B=stripSpaces(B);if(B.toLowerCase().substr(0,4)=="rgb("){colors=B.toLowerCase().substr(4,B.toLowerCase().length-5);colors=colors.split(",");return"#"+YAHOO.util.Color.rgb2hex(colors).toLowerCase()}}catch(A){}return"#ffffff"}function getRGB(B){try{B=strTrim(B).toLowerCase();if(colorRGB[B]!==undefined){return colorRGB[B]}}catch(A){}if((B.r!==undefined)&&(B.g!==undefined)&&(B.b!==undefined)){return B}if((B[0]!==undefined)&&(B[1]!==undefined)&&(B[2]!==undefined)&&B[0]>=0&&B[1]>=0&&B[2]>=0&&B[0]<256&&B[1]<256&&B[2]<256){return YAHOO.util.Color.rgb2hex(B).toLowerCase()}if(B.charAt(0)=="#"){B=B.substr(1,6);color=YAHOO.util.Color.hex2rgb(B);for(i=0;i<color.length;i++){if(isNaN(color[i])){color[i]=0}}return color}B=stripSpaces(B);if(B.toLowerCase().substr(0,4)=="rgb("){colors=B.toLowerCase().substring(4,(B.length-1));return colors.split(",")}return colorRGB.white}function changeColor(A){latestColor=getHex(A.newValue);document.getElementById("color_type_none").checked=false;document.getElementById("color_type_color").checked=true}function setItemColor(B,A){if(pickerDialog){pickerDialog.hide()}currentVars.themeid=false;if(isIE6&&pagebackgroundcolor){div_page=document.getElementById("customize_page");if(div_page!=undefined){div_page.style.backgroundColor=pagebackgroundcolor}}if(!A){return }if(current_displaydiv_name&&(document.getElementById(current_displaydiv_name)!==undefined)){if(allowImage&&document.getElementById("color_type_image").checked){imageUrl=document.getElementById("image_url");if(imageUrl==undefined||imageUrl.value==undefined||imageUrl.value==""){return }if(true){document.getElementById(current_displaydiv_name).value=cleanImageLoc(imageUrl.value);if(document.getElementById("repeat_type")!==undefined){repeat=document.getElementById("repeat_type").value}else{repeat="repeat"}setClassColor(current_displaydiv_name,null,imageUrl.value,repeat);if(currentVars[current_displaydiv_name+"_image"]!==undefined){currentVars[current_displaydiv_name+"_image"]=imageUrl.value}if(currentVars[current_displaydiv_name+"_repeat"]!==undefined){currentVars[current_displaydiv_name+"_repeat"]=repeat}}return }if((document.getElementById(current_colordiv)!==undefined)&&document.getElementById("color_type_none").checked){document.getElementById(current_colordiv).style.backgroundColor="transparent";setClassColor(current_displaydiv_name,"transparent",null,null);document.getElementById(current_displaydiv_name).value="transparent";return }if(latestColor&&(document.getElementById(current_colordiv)!==undefined)){if(latestColor.r!==undefined&&latestColor.g!==undefined&&latestColor.b!==undefined){color="rgb("+latestColor.r+","+latestColor.g+","+latestColor.b+")";document.getElementById(current_colordiv).style.backgroundColor=color}else{if(latestColor=="transparent"){color="transparent"}else{if(latestColor[0]!==undefined&&latestColor[1]!==undefined&&latestColor[2]!==undefined&&latestColor.length==3){color="rgb("+latestColor.join(",")+")"}else{color=latestColor}}}document.getElementById(current_colordiv).style.backgroundColor=color;document.getElementById(current_displaydiv_name).value=getHex(color);setClassColor(current_displaydiv_name,getHex(color),null,null)}}}function showColorInput(C,D){current_displaydiv_name=D;current_colordiv="colorbox_"+D;targetDiv=document.getElementById(current_colordiv);varname=(D.indexOf("background")>0)?D+"_color":D;color=currentVars[varname];latestColor=color;if(color!="transparent"){color=getRGB(color)}if(!pickerDialog){pickerDialog=new YAHOO.widget.Panel("picker_container",{draggable:true,dragonly:true,modal:false,close:false,underlay:"shadow",width:"35em",height:"20em"});document.getElementById("picker_container").style.display="block";pickerDialog.setHeader(select_color_information);pickerDialog.render()}if(!colorPicker){colorPicker=new YAHOO.widget.ColorPicker("picker",{showhsvcontrols:true,showhexcontrols:true,showrgbcontrols:true,images:{PICKER_THUMB:yuipath+"/colorpicker/assets/picker_thumb.png",HUE_THUMB:yuipath+"/colorpicker/assets/hue_thumb.png"}});colorPicker.on("rgbChange",changeColor)}pickerDialog.show();if(color=="transparent"){document.getElementById("color_type_none").checked=true;document.getElementById("color_type_color").checked=false}else{document.getElementById("color_type_none").checked=false;document.getElementById("color_type_color").checked=true}document.getElementById("picker").style.display="inline";document.getElementById("image_entry").style.display="none";if(color=="transparent"){color=[255,255,255];document.getElementById("color_type_none").checked="checked"}else{document.getElementById("color_type_color").checked="checked"}document.getElementById("color_type_image").checked=false;document.getElementById("image_url").value="";userprofSetBackgroundType(C,true);colorPicker.setValue(color);try{moveToX=YAHOO.util.Dom.getX(D);viewport_info=fetch_viewport_info(true);blockWidth=document.getElementById("picker_container").clientWidth+10;if(moveToX+blockWidth>viewport_info.w){moveToX=viewport_info.w-blockWidth}pickerDialog.moveTo(moveToX,YAHOO.util.Dom.getY(D))}catch(C){}if(D.indexOf("background")>0){document.getElementById("type_selector").style.display="inline";document.getElementById("set_color").style.display="inline";document.getElementById("set_image").style.display="inline";document.getElementById("set_none").style.display="inline";allowImage=true;edit_div=document.getElementById(D);if(edit_div!=null){current_value=edit_div.value;if((current_value.substr(0,4)=="http")||(current_value.substr(0,4)=="url(")||(current_value.indexOf("attachment.php")>-1)||(current_value.indexOf("/")>-1)){document.getElementById("picker").style.display="none";document.getElementById("image_entry").style.display="inline";document.getElementById("color_type_color").checked=false;document.getElementById("color_type_image").checked=true;document.getElementById("image_url").value=current_value;repeatvar=D+"_repeat";if(currentVars[repeatvar]&&currentVars[repeatvar]!=""){repeat_select=document.getElementById("repeat_type");if(repeat_select){for(i=0;i<repeat_select.options.length;i++){repeat_select.options[i].selected=(repeat_select.options[i].value==currentVars[repeatvar])}}}}}}else{if(D.indexOf("border")>0){document.getElementById("type_selector").style.display="inline";document.getElementById("set_color").style.display="inline";document.getElementById("set_image").style.display="none";document.getElementById("set_none").style.display="inline";allowImage=true}else{document.getElementById("type_selector").style.display="none";allowImage=false}}if(isIE6){div_page=document.getElementById("customize_page");if(div_page!=undefined){var B=YAHOO.util.Dom.getStyle(div_page,"background-color");editpage_div=document.getElementById("userprof_customize_edit");if(editpage_div!=undefined){var A=YAHOO.util.Dom.getStyle(editpage_div,"background-color")}if(A){div_page.style.backgroundColor=A}}}}function userprofShowCustomize(D,C){if(document.getElementById("userprof_customize")!==undefined){if(page_height){if(isIE6){document.getElementById("userprof_customize").style.display="block";document.getElementById("userprof_customize").style.height="auto"}else{var A={height:{to:page_height}};var B=new YAHOO.util.Anim("userprof_customize",A,0.5);B.animate();document.getElementById("customize_header").style.display="block";var A={height:{to:page_height-50}};var E=new YAHOO.util.Anim("customize_page",A,0.5);E.animate()}}if(document.getElementById("header").style.opacity!==undefined){if(document.getElementById("header")!=undefined){document.getElementById("header").style.opacity=0.5}if(document.getElementById("navbar")!=undefined){document.getElementById("navbar").style.opacity=0.5}if(document.getElementById("footer")!=undefined){document.getElementById("footer").style.opacity=0.5}if(document.getElementById("footer_time")!=undefined){document.getElementById("footer_time").style.opacity=0.5}if(document.getElementById("footer_copyright")!=undefined){document.getElementById("footer_copyright").style.opacity=0.5}if(document.getElementById("footer_morecopyright")!=undefined){document.getElementById("footer_morecopyright").style.opacity=0.5}}else{if(document.getElementById("header").style.filter!==undefined){if(document.getElementById("header")!=undefined){document.getElementById("header").style.filter="alpha(opacity=50)"}if(document.getElementById("navbar")!=undefined){document.getElementById("navbar").style.filter="alpha(opacity=50)"}if(document.getElementById("footer")!=undefined){document.getElementById("footer").style.filter="alpha(opacity=50)"}if(document.getElementById("footer_time")!=undefined){document.getElementById("footer_time").style.filter="alpha(opacity=50)"}if(document.getElementById("footer_copyright")!=undefined){document.getElementById("footer_copyright").style.filter="alpha(opacity=50)"}if(document.getElementById("footer_morecopyright")!=undefined){document.getElementById("footer_morecopyright").style.filter="alpha(opacity=50)"}}}if(document.getElementById("userprof_customize_themes")){userprofShowThemes(D,C)}else{if(document.getElementById("userprof_customize_edit")){userprofShowEdits(D,C)}}}close_now=false}function userprofHideCustomize(D,A){if(style_unsaved&&!A){confirmExit();return }if(alertbox){alertbox.hide()}if(pickerDialog){pickerDialog.hide()}if(confirmCloseBox){confirmCloseBox.hide()}if(document.getElementById("userprof_customize")!==undefined){if(page_height){if(isIE6){document.getElementById("userprof_customize").style.display="none";document.getElementById("userprof_customize").style.height="0px"}else{var B={height:{to:0}};var C=new YAHOO.util.Anim("customize_page",B,0.5);C.animate();var E=new YAHOO.util.Anim("userprof_customize",B,0.5);E.animate();document.getElementById("customize_header").style.display="none"}}if(document.getElementById("userprof_customize_edit")){document.getElementById("userprof_customize_edit").style.display="none"}if(document.getElementById("userprof_customize_themes")){document.getElementById("userprof_customize_themes").style.display="none"}if(document.getElementById("header").style.opacity!==undefined){if(document.getElementById("header")!=undefined){document.getElementById("header").style.opacity=1}if(document.getElementById("navbar")!=undefined){document.getElementById("navbar").style.opacity=1}if(document.getElementById("footer")!=undefined){document.getElementById("footer").style.opacity=1}if(document.getElementById("footer_time")!=undefined){document.getElementById("footer_time").style.opacity=1}if(document.getElementById("footer_copyright")!=undefined){document.getElementById("footer_copyright").style.opacity=1}if(document.getElementById("footer_morecopyright")!=undefined){document.getElementById("footer_morecopyright").style.opacity=1}}else{if(document.getElementById("header").style.filter!==undefined){if(document.getElementById("header")!=undefined){document.getElementById("header").style.filter="alpha(opacity=100)"}if(document.getElementById("navbar")!=undefined){document.getElementById("navbar").style.filter="alpha(opacity=100)"}if(document.getElementById("footer")!=undefined){document.getElementById("footer").style.filter="alpha(opacity=100)"}if(document.getElementById("footer_time")!=undefined){document.getElementById("footer_time").style.filter="alpha(opacity=100)"}if(document.getElementById("footer_copyright")!=undefined){document.getElementById("footer_copyright").style.filter="alpha(opacity=100)"}if(document.getElementById("footer_morecopyright")!=undefined){document.getElementById("footer_morecopyright").style.filter="alpha(opacity=100)"}}}}}function userprofSetBackgroundType(D,A){var B=document.getElementById("picker");var C=document.getElementById("image_entry");if(A){B.style.display="block";colorPicker.setValue(getRGB(latestColor));C.style.display="none"}else{B.style.display="none";C.style.display="block"}}function userprofShowThemes(B,A){if(document.getElementById("userprof_customize_themes")){document.getElementById("userprof_customize_themes").style.display="block";document.getElementById("userprof_themes").className="userprof_tab_active";document.getElementById("userprof_customize_themes").style.left="0px";if(isIE6){document.getElementById("userprof_customize_themes").style.height=(page_height-70)+"px"}else{document.getElementById("userprof_customize_themes").style.height="auto"}}if(document.getElementById("userprof_customize_edit")!=null){document.getElementById("userprof_customize_edit").style.display="none";document.getElementById("userprof_customize_link").className="userprof_tab"}}function setFont(F,E){var C=document.getElementById("select_font_family");currentVars.themeid=false;style_unsaved=false;theme_unchanged=false;if(C!==undefined){fontname=C.value;C.style.fontFamily=fontname;if(currentVars.font_family!=fontname){currentVars.font_family=fontname;style_unsaved=true;theme_unchanged=false}}fontdisplay=document.getElementById("font_display");if(fontdisplay){fontdisplay.style.fontFamily=(currentVars.font_family=="default")?default_font:currentVars.font_family}for(var B=0;B<document.styleSheets.length;B++){try{var G=document.styleSheets[B].cssRules?document.styleSheets[B].cssRules:document.styleSheets[B].rules;if(G==null){continue}for(var D=0;D<G.length;D++){if(G[D].selectorText==undefined){continue}var A=classmap[G[D].selectorText.toLowerCase()];if(A!==undefined){if(A.f){if(fontname.toLowerCase()=="default"){G[D].style.fontFamily=default_font}else{G[D].style.fontFamily=fontname}}}}}catch(F){}}}function setFontSize(F,E){var C=document.getElementById("select_fontsize");currentVars.themeid=false;if(C!==undefined){var H=C.options[C.selectedIndex].value;if(currentVars.fontsize!=H){currentVars.fontsize=H;style_unsaved=true;theme_unchanged=false}fontdisplay=document.getElementById("font_display");if(fontdisplay){fontdisplay.innerHTML=C.options[C.selectedIndex].text;fontdisplay.style.fontSize=H;fontdisplay.style.fontFamily=(currentVars.font_family=="default")?default_font:currentVars.font_family}}for(var B=0;B<document.styleSheets.length;B++){try{var G=document.styleSheets[B].cssRules?document.styleSheets[B].cssRules:document.styleSheets[B].rules;if(G==null){continue}for(var D=0;D<G.length;D++){if(G[D].selectorText==undefined){continue}var A=classmap[G[D].selectorText.toLowerCase()];if(A!==undefined){if(A.fs){G[D].style.fontSize=H}}}}catch(F){}}}function userprofShowEdits(B,A){if(document.getElementById("userprof_customize_themes")!=null){document.getElementById("userprof_customize_themes").style.display="none";document.getElementById("userprof_themes").className="userprof_tab"}if(document.getElementById("userprof_customize_edit")!=null){document.getElementById("userprof_customize_edit").style.display="block";document.getElementById("userprof_customize_link").className="userprof_tab_active";if(isIE){document.getElementById("userprof_customize_edit").style.height=(page_height-70)+"px"}if(isIE6){document.getElementById("userprof_customize").style.left="5px";document.getElementById("userprof_customize").style.left="auto";document.getElementById("userprof_customize").style.right="5px";document.getElementById("userprof_customize").style.right="auto"}}}function createAssetPicker(C){if(C.responseXML){var D=C.responseXML.getElementsByTagName("error");if(D&&(D.length>0)){for(i=0;i<D[0].childNodes.length;i++){if(D[0].childNodes[i].nodeName=="phrase"){var B=D[0].childNodes[i].childNodes[0].nodeValue;break}}showMessage(B);return }var E=C.responseXML.getElementsByTagName("content");if(E.length&&E[0].hasChildNodes()){for(i=0;i<E[0].childNodes.length;i++){if(E[0].childNodes[i].nodeName=="body"){var A=E[0].childNodes[i].childNodes[0].nodeValue}else{if(E[0].childNodes[i].nodeName=="header"){var G=E[0].childNodes[i].childNodes[0].nodeValue}else{if(E[0].childNodes[i].nodeName=="footer"){var F=E[0].childNodes[i].childNodes[0].nodeValue}}}}if(!A){return }assetPicker=new YAHOO.widget.Panel("attach_popup",{draggable:true,dragonly:true,modal:true,close:false,underlay:"shadow",width:"470px",height:"440px",fixedcenter:false,iframe:true});assetPicker.setHeader(G);assetPicker.setFooter(F);assetPicker.setBody(A);assetPicker.render();assetPicker.show();assetPicker.center();document.getElementById("attach_popup").style.top=top_offset+"px";elements=YAHOO.util.Dom.getElementsByClassName("bd",null,"attach_popup");if(elements!==undefined){YAHOO.util.Dom.setStyle(elements[0],"height","373px")}document.getElementById("attach_popup").style.display="block";YAHOO.util.Event.on("asset_save","click",closeAssetPicker,true);YAHOO.util.Event.on("asset_cancel","click",closeAssetPicker,false);YAHOO.util.Event.on("albums","click",getAlbumContents,false)}}}function showAssetPicker(B){if(assetPicker){assetPicker.show();assetPicker.center();return }var A="./ajax.php?do=getassetpicker&&sessionurl="+SESSIONURL+"&securitytoken="+SECURITYTOKEN+"&ajax=1";YAHOO.util.Connect.asyncRequest("POST",A,{success:createAssetPicker,timeout:vB_Default_Timeout,scope:this},"securitytoken="+SECURITYTOKEN)}function closeAssetPicker(A,B){if(assetPicker){assetPicker.hide();if(B){radiobtn=document.getElementById("attachment_info").attachmentid;if(radiobtn.length==undefined){if(radiobtn.checked){image_edit=document.getElementById("image_url");if(image_edit!=undefined){image_edit.value="attachment.php?attachmentid="+radiobtn.value;return }}}else{for(i=0;i<radiobtn.length;i++){if(radiobtn[i].checked){image_edit=document.getElementById("image_url");if(image_edit!=undefined){image_edit.value="attachment.php?attachmentid="+radiobtn[i].value;return }}}}}}}function showAlbumContents(B){if(B.responseText){var D=document.getElementById("album_content");if(D!==undefined){D.innerHTML=B.responseText}var C=YAHOO.util.Dom.getElementsByClassName("asset_bit","","attachment_info");for(var A=0;A<C.length;A++){YAHOO.util.Event.on(C[A],"click",clickAsset);YAHOO.util.Dom.setStyle(C[A],"cursor",pointer_cursor)}}}function clickAsset(C){var B=this.getElementsByTagName("input");for(var A=0;A<B.length;A++){if(B[A].type=="radio"){B[A].checked="checked";return }}}function getAlbumContents(C){var A=document.getElementById("albums");if(A==undefined){return }if(parseInt(A.value)>0){var B="./ajax.php?do=getalbum&albumid="+A.value+"&sessionurl="+SESSIONURL+"&securitytoken="+SECURITYTOKEN+"&ajax=1";YAHOO.util.Connect.asyncRequest("POST",B,{success:showAlbumContents,timeout:vB_Default_Timeout,scope:this},"securitytoken="+SECURITYTOKEN)}}var userprofSetCustomize=function(){YAHOO.util.Dom.removeClass("profile_customization_button","hidden");YAHOO.util.Event.on("profile_customization_button","click",userprofShowCustomize);YAHOO.util.Event.on("userprof_exit","click",userprofHideCustomize);YAHOO.util.Event.on("userprof_revert","click",revert,true);YAHOO.util.Event.on("userprof_default","click",setDefault);YAHOO.util.Event.on("userprof_save","click",save);YAHOO.util.Event.on("userprof_save_default","click",saveAsDefault);YAHOO.util.Event.on("userprof_themes","click",userprofShowThemes);YAHOO.util.Event.on("userprof_customize_link","click",userprofShowEdits);YAHOO.util.Event.on("submit_color","click",setItemColor,true);YAHOO.util.Event.on("cancel_color","click",setItemColor,false);YAHOO.util.Event.on("color_type_color","click",userprofSetBackgroundType,true);YAHOO.util.Event.on("color_type_image","click",userprofSetBackgroundType,false);YAHOO.util.Event.on("select_font_family","change",setFont);YAHOO.util.Event.on("select_fontsize","change",setFontSize);YAHOO.util.Event.on("button_no","click",closeMessage);YAHOO.util.Event.on("button_exit","click",userprofHideCustomize,true);YAHOO.util.Event.on("button_ok","click",closeMessage);try{var B=YAHOO.lang.JSON.parse(settings_string);for(themeid in B){YAHOO.util.Event.on(B[themeid],"click",getTheme,themeid)}}catch(D){}YAHOO.util.Event.on("colorbox_title_text_color","click",showColorInput,"title_text_color");YAHOO.util.Event.on("colorbox_page_background","click",showColorInput,"page_background");YAHOO.util.Event.on("colorbox_module_text_color","click",showColorInput,"module_text_color");YAHOO.util.Event.on("colorbox_module_link_color","click",showColorInput,"module_link_color");YAHOO.util.Event.on("colorbox_module_background","click",showColorInput,"module_background");YAHOO.util.Event.on("colorbox_module_border","click",showColorInput,"module_border");YAHOO.util.Event.on("colorbox_content_text_color","click",showColorInput,"content_text_color");YAHOO.util.Event.on("colorbox_content_link_color","click",showColorInput,"content_link_color");YAHOO.util.Event.on("colorbox_content_background","click",showColorInput,"content_background");YAHOO.util.Event.on("colorbox_content_border","click",showColorInput,"content_border");YAHOO.util.Event.on("colorbox_button_text_color","click",showColorInput,"button_text_color");YAHOO.util.Event.on("colorbox_button_background","click",showColorInput,"button_background");YAHOO.util.Event.on("colorbox_button_border","click",showColorInput,"button_border");YAHOO.util.Event.on("colorbox_page_link_color","click",showColorInput,"page_link_color");YAHOO.util.Event.on("colorbox_moduleinactive_text_color","click",showColorInput,"moduleinactive_text_color");YAHOO.util.Event.on("colorbox_moduleinactive_link_color","click",showColorInput,"moduleinactive_link_color");YAHOO.util.Event.on("colorbox_moduleinactive_background","click",showColorInput,"moduleinactive_background");YAHOO.util.Event.on("colorbox_moduleinactive_border","click",showColorInput,"moduleinactive_border");YAHOO.util.Event.on("colorbox_headers_text_color","click",showColorInput,"headers_text_color");YAHOO.util.Event.on("colorbox_headers_link_color","click",showColorInput,"headers_link_color");YAHOO.util.Event.on("colorbox_headers_border","click",showColorInput,"headers_border");YAHOO.util.Event.on("colorbox_headers_background","click",showColorInput,"headers_background");YAHOO.util.Event.on("get_image","click",showAssetPicker);YAHOO.util.Event.on("title_text_color","blur",setColorFromEdit,"title_text_color");YAHOO.util.Event.on("page_background","blur",setColorFromEdit,"page_background");YAHOO.util.Event.on("module_text_color","blur",setColorFromEdit,"module_text_color");YAHOO.util.Event.on("module_link_color","blur",setColorFromEdit,"module_link_color");YAHOO.util.Event.on("module_background","blur",setColorFromEdit,"module_background");YAHOO.util.Event.on("module_border","blur",setColorFromEdit,"module_border");YAHOO.util.Event.on("content_text_color","blur",setColorFromEdit,"content_text_color");YAHOO.util.Event.on("content_link_color","blur",setColorFromEdit,"content_link_color");YAHOO.util.Event.on("page_link_color","blur",setColorFromEdit,"page_link_color");YAHOO.util.Event.on("content_background","blur",setColorFromEdit,"content_background");YAHOO.util.Event.on("content_border","blur",setColorFromEdit,"content_border");YAHOO.util.Event.on("button_text_color","blur",setColorFromEdit,"button_text_color");YAHOO.util.Event.on("button_background","blur",setColorFromEdit,"button_background");YAHOO.util.Event.on("button_border","blur",setColorFromEdit,"button_border");YAHOO.util.Event.on("moduleinactive_text_color","blur",setColorFromEdit,"moduleinactive_text_color");YAHOO.util.Event.on("moduleinactive_link_color","blur",setColorFromEdit,"moduleinactive_link_color");YAHOO.util.Event.on("moduleinactive_background","blur",setColorFromEdit,"moduleinactive_background");YAHOO.util.Event.on("moduleinactive_border","blur",setColorFromEdit,"moduleinactive_border");YAHOO.util.Event.on("headers_text_color","blur",setColorFromEdit,"headers_text_color");YAHOO.util.Event.on("headers_link_color","blur",setColorFromEdit,"headers_link_color");YAHOO.util.Event.on("headers_background","blur",setColorFromEdit,"headers_background");YAHOO.util.Event.on("headers_border","blur",setColorFromEdit,"headers_border");try{currentVars=userTheme;setVarsToHex()}catch(D){}isIE6=navigator.userAgent.toLowerCase().indexOf("msie 6")!=-1;isIE=navigator.userAgent.toLowerCase().indexOf("msie")!=-1;try{for(var A=0;A<document.styleSheets.length;A++){try{var E=document.styleSheets[A].cssRules?document.styleSheets[A].cssRules:document.styleSheets[A].rules;if(E==null){continue}for(var C=0;C<E.length;C++){if(E[C].selectorText==".userprof_tab_active"){tabcolors.activecolor=E[C].style.color;tabcolors.activebg=E[C].style.backgroundColor}else{if(E[C].selectorText==".userprof_tab"){tabcolors.inactivecolor=E[C].style.color;tabcolors.inactivebg=E[C].style.backgroundColor}}}}catch(D){}}}catch(D){}if(document.getElementById("userprof_customize_edit")!=undefined){document.getElementById("userprof_customize_edit").style.display="block"}if(document.getElementById("userprof_customize_themes")){document.getElementById("userprof_customize_themes").style.display="block";document.getElementById("userprof_customize_themes").style.display="none"}if(document.getElementById("userprof_customize")!=undefined){document.getElementById("userprof_customize").style.display="block"}page_height=document.getElementById("userprof_customize").offsetHeight;if(isIE){page_height+=15}document.getElementById("userprof_customize").style.height="0px";if(isIE6){document.getElementById("userprof_customize").style.display="block";if(document.getElementById("userprof_customize_themes")){userprofShowThemes(null,null)}else{if(document.getElementById("userprof_customize_edit")){userprofShowEdits(null,null)}}userprofHideCustomize(null,true)}else{document.getElementById("userprof_customize").style.height="0px";document.getElementById("userprof_customize").style.display="block"}if(document.getElementById("userprof_customize_themes")){document.getElementById("userprof_customize_themes").style.display="none"}if(document.getElementById("userprof_customize_edit")!=undefined){document.getElementById("userprof_customize_edit").style.display="none"}if(isIE6){document.getElementById("userprof_customize").style.display="block";if(document.getElementById("userprof_customize_themes")){userprofShowThemes(null,null)}else{if(document.getElementById("userprof_customize_edit")){userprofShowEdits(null,null)}}userprofHideCustomize(null,true)}else{document.getElementById("userprof_customize").style.height="0px";document.getElementById("userprof_customize").style.display="block"}top_offset=parseInt(document.getElementById("header").offsetHeight)+parseInt(document.getElementById("navbar").offsetHeight);if(isNaN(top_offset)){top_offset=parseInt(YAHOO.util.Dom.getStyle("header","height"))+parseInt(YAHOO.util.Dom.getStyle("navbar","height"))}if(isNaN(top_offset)){top_offset=150}if(document.getElementById("close_dialog_box")!==undefined){document.getElementById("close_dialog_box").style.top="-"+top_offset+"px"}if(document.getElementById("dialog_box")!==undefined){document.getElementById("dialog_box").style.top="-"+top_offset+"px"}if(page_height<100){page_height=650}loadClasses()};YAHOO.util.Event.onDOMReady(userprofSetCustomize);