function ChangeStyle(){if(document.getElementById('styleid').value!==""){self.location = 'index.php?styleid='+document.getElementById('styleid').value;}}function FadeIn(ln,r)  {SpecialEffects = document.getElementById('enablespecialeffects');if(SpecialEffects){if(SpecialEffects.value=="1"){if(r==1){}else{opac=20;}if(opac < 100 || opac==100){opac+=5;if(document.all){document.getElementById(ln).filters.alpha.opacity = opac;}document.getElementById(ln).style.opacity = opac/100;setTimeout("FadeItIn('"+ln+"',1)", 30);}}}}function FadeOut(ln,r)  {SpecialEffects = document.getElementById('enablespecialeffects');if(SpecialEffects){if(SpecialEffects.value=="1"){if(r==1){}else{opac=100;}if(opac > 70 || opac==70){opac-=5;if(document.all){document.getElementById(ln).filters.alpha.opacity = opac;}document.getElementById(ln).style.opacity = opac/100;setTimeout("FadeOut('"+ln+"',1)", 30);}}}}function ImageFadeIn(ln,r)  {if(r==1){}else{opac=70;}if(opac < 100 || opac==100){opac+=5;if(document.all){document.getElementById(ln).filters.alpha.opacity = opac;}document.getElementById(ln).style.opacity = opac/100;setTimeout("ImageFadeIn('"+ln+"',1)", 30);}}function ImageFadeOut(ln,r)  {if(r==1){}else{opac=100;}if(opac > 70 || opac==70){opac-=5;if(document.all){document.getElementById(ln).filters.alpha.opacity = opac;}document.getElementById(ln).style.opacity = opac/100;setTimeout("ImageFadeOut('"+ln+"',1)", 30);}}function ChangeDis(i, d){if(d==1){document.getElementById('passkey'+i).disabled=false;}if(d==0){document.getElementById('passkey'+i).disabled=true;}}function ChangeFiles(type,folderid){if(type=="members"){self.location='index.php?action=account&view=upload&folderid='+folderid+'&filesnum='+document.getElementById('fnselect').value;}if(type=="visitors"){self.location='index.php?filesnum='+document.getElementById('fnselect').value+'#visitorsupload';}}function GoTo(url){self.location=url;}function CopyCode(ln) {r=document.getElementById(ln).createTextRange();r.select();r.execCommand('copy');}function ChangeReceipts(fileid){self.location='index.php?action=sendtofriend&id='+fileid+'&receiptnums='+document.getElementById('receipts').value;}function checkAll(nm){ca = document.getElementById('extensionallcheck');if(ca.checked==true){for(var j=1; j<=nm; j++){if(document.getElementById('extension'+j)){document.getElementById('extensioncheck'+j).checked = true;}}}else if(ca.checked==false){for (var j =1; j<=nm; j++){if(document.getElementById('extension'+j)){document.getElementById('extensioncheck'+j).checked = false;}}}}function FadeItIn(ln,r)  {SpecialEffects = document.getElementById('enablespecialeffects');if(SpecialEffects){if(SpecialEffects.value=="1"){if(r==1){}else{opac=0;}if(opac < 100 || opac==100){opac+=5;if(document.getElementById(ln)){if(document.all){document.getElementById(ln).filters.alpha.opacity = opac;}document.getElementById(ln).style.opacity = opac/100;}setTimeout("FadeItIn('"+ln+"',1)", 30);}}}}function E(id){element = document.getElementById(id);return element;}function RemoveAllEnlarged(id){el = document.getElementById('works_thumb_ids');if(el){works_ids = new String(el.innerHTML);works_ids_arr = works_ids.split("-");for(i in works_ids_arr){elname = document.getElementById('work_'+works_ids_arr[i]);if(elname){elname.style.display = 'none';}}}}function Enlarge(id,imgid,src,currid){RemoveAllEnlarged();var IE = (document.all)?true:false;el = E(id);img = E(imgid);if(el && img){img.src=src;el.style.display='';if (IE) {tempY = event.clientY + document.body.scrollTop;tempX = event.clientX + document.body.scrollLeft;} else {tempY = e.pageY;tempX = e.pageX;}el.style.top = tempY-100;el.style.left = tempX-300;}}function MoveEnlarge(id){var IE = document.all?true:false;if (!IE){ document.captureEvents(Event.MOUSEMOVE);}var tempX = 0;var tempY = 0;el = E(id);if(el){  document.onmousemove = function(e){if (IE) {tempY = event.clientY + document.body.scrollTop;tempX = event.clientX + document.body.scrollLeft;} else {tempY = e.pageY;tempX = e.pageX;}if (tempX < 0){tempX = 0}if (tempY < 0){tempY = 0}el.style.top = tempY-100;el.style.left = tempX-300;}}}function CancelEnlarge(id){e = E(id);if(e){e.style.display='none';}}function ChangeContent(from, to, id){if(document.getElementById('tabs')){if(document.getElementById('tabs').value=="1"){fromelement = document.getElementById(from);toelement = document.getElementById(to);if(fromelement && toelement){toelement.innerHTML = fromelement.innerHTML;}var classn = '';for(j=1;j<=4;j++){if(j==id){classn = 'tab_selected';}else{classn = 'tab';}if(document.getElementById('td'+j).className!=="tab_selectednone" && document.getElementById('td'+j).className!=="tabnone"){document.getElementById('td'+j).className=classn;}}}}}function CheckShowHide(check,showhide){checkbox=document.getElementById(check);showhideelement=document.getElementById(showhide);if(checkbox){if(checkbox.checked){showhideelement.className='';}else{showhideelement.className='none';}}}function ButtonShowHide(shown,hidden){shownelement = E(shown);hiddenelement = E(hidden);if(shownelement && hiddenelement){if(shownelement.className==''){shownelement.className = 'none';}else{shownelement.className = '';}if(hiddenelement.className==''){hiddenelement.className = 'none';}else{hiddenelement.className = '';}}}function ShowHide(hidden){hiddenelement = E(hidden);if(hiddenelement){if(hiddenelement.className==''){hiddenelement.className = 'none';}else{hiddenelement.className = '';}}}function DisableElement(id){element = E(id);element.disabled=true;}function ShowMenu(id){element = E(id);element.style.display = '';}function HideMenu(id){element = E(id);element.style.display = 'none';}function DisplayOptions(id, display, nums){select = E(id);selectvalue = select.value;element = display+selectvalue;displayed = E(element);if(displayed){displayed.style.display = '';}for(i=0;i<=nums;i++){if(i==selectvalue){continue;}hideelement = display+i;hide = E(hideelement);if(hide){hide.style.display = 'none';}}}function LiveSupportSubmit(id, secrettxt){elementinput = E(id);elementinputdiv = E('normaltext');secretinput = E('secret');secretinputdiv = E('secretdata');escaped = new String(escape(elementinput.value));escaped = escaped.replace(/%0D%0A/g, '');elementvalue = E(id+'_value');secretelementvalue = E('secret_value');attachesnums = document.getElementById('attachedfiles');var attaches = 0;if(attachesnums){attachesnums = parseFloat(attachesnums.value);for(i=1;i<=attachesnums;i++){if(document.getElementById('inputfile'+i).value!==""){attaches = 1;}}}if((((elementinput.value==''  || escaped=='') && attaches==0) && elementinputdiv.className=='') || (secretinput.value=='' && secretinputdiv.className=='')){return false;}else{if(elementvalue){var secret=0;if(elementinputdiv.className=='none' && secretinput.value!==''){elementinput.value = secretinput.value;secretelementvalue.value=secretinput.value;secret=1;}else{secretelementvalue.value='';secret=0;}elementvalue.value=elementinput.value; if(secret=="1"){text = "<div class='high'>&nbsp;<i>"+secrettxt+"</i>&nbsp;</div>";}else{text = elementvalue.value;}if(attaches=="0"){new_reply_div = E('new_reply');new_time_div = E('new_time');time = new String(new_time_div.innerHTML);str = new String(new_reply_div.innerHTML);text = text.replace("\n",'');text = text.replace(/\n/g,"<br>");reply = str.replace('{text}', text);str = reply;reply = str.replace('{time}', time);reply = MakeURL(reply);parent.frames.chatbox.document.getElementById('chatdiv').innerHTML = parent.frames.chatbox.document.getElementById('chatdiv').innerHTML+reply;writingnow = E('writingstatus');writingnow.value = "0";parent.frames.chatbox.scrollTo(0,999999);if(document.getElementById('sound').value=='1'){document.getElementById('sounddiv').innerHTML = "<embed src='images/newreply.swf' width='1' height='1'></embed>";}}}elementinput.value='';if(secretinputdiv.className==''){secretinputdiv.className='none';elementinputdiv.className='';secretinput.value = '';}attachesinputdiv = E('attaches');if(attachesinputdiv){if(attachesinputdiv.className==''){attachesinputdiv.className='none';setTimeout('RemoveAttachments()',1000); }}}}function EnterCheck(e, secretinfo){key = window.event.keyCode;shift = window.event.shiftKey;if(key=="13" && !shift){LiveSupportSubmit('text', secretinfo);formelement = E('chatform');formelement.submit();}}function RemoveAttachments(){formelement = E('chatform');formelement.reset();}function MakeURL(str){if(str.indexOf("http://")!==-1){parts = str.split("http://");newstr = new String(parts[1]);parts2 = newstr.split(" ");restlink = parts2[0];url = "http://"+restlink;final = str.replace(url, "<a href='"+url+"' target='_blank'>"+url+"</a>");return final;}else{return str;}}function UpdateChat(){if(document.getElementById('chatid')){if (window.XMLHttpRequest) {http_request2 = new XMLHttpRequest();} else if (window.ActiveXObject) {http_request2 = new ActiveXObject("Microsoft.XMLHTTP");}id=document.getElementById('chatid').value;http_request2.onreadystatechange = GetUpdated;http_request2.open('POST', 'index.php?a=livesupport');http_request2.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');http_request2.send("type=updatechat&chatid="+id);}}function GetUpdated() {if (http_request2.readyState == 4) {if (http_request2.status == 200) {if(http_request2.responseText=="exit"){if(document.getElementById('text')){document.getElementById('text').disabled=true;document.getElementById('submittext').disabled=true;document.getElementById('chatclosed').value=1;clearTimeout('durationtiming');start_new = document.getElementById('start_new_chat_link');if(start_new){start_new.className='';}DisableElement('closechatbutton');rating_td = document.getElementById('chat_rating');notification_td = document.getElementById('chat_notification');if(rating_td){if(rating_td.innerHTML!==''){rating_td.className='';}}if(notification_td){if(notification_td.innerHTML!==''){notification_td.className='high';}}closemsg = document.getElementById('closewaiting');if(closemsg){closemsg.style.display='none';}closemsg = document.getElementById('closedone');if(closemsg){alert(closemsg.innerHTML);}}}else{parent.frames.chatbox.document.getElementById('chatdiv').innerHTML = parent.frames.chatbox.document.getElementById('chatdiv').innerHTML+http_request2.responseText;if(http_request2.responseText==''){}else{if(document.getElementById('sound').value=='1'){document.getElementById('sounddiv').innerHTML = "<embed src='images/newreply.swf' width='1' height='1'>";}}parent.frames.chatbox.scrollTo(0,999999);setTimeout('UpdateChat()',5000);}} else {setTimeout('UpdateChat()',5000);return false;}}}function CheckWriting(){if(document.getElementById('chatid')){if (window.XMLHttpRequest) {http_request3 = new XMLHttpRequest();} else if (window.ActiveXObject) {http_request3 = new ActiveXObject("Microsoft.XMLHTTP");}id=document.getElementById('chatid').value;writingtext = E('text');var updatewritingstatus=0;if(writingtext){writingtextvalue = new String(writingtext.value);escaped = new String(escape(writingtext.value));escaped = escaped.replace(/%0D%0A/g, '');if(writingtextvalue!=="" && escaped!==""){updatewritingstatus = 1;}}http_request3.onreadystatechange = GetWritingStatus;http_request3.open('POST', 'index.php?a=livesupport');http_request3.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');http_request3.send("type=writingstatus&chatid="+id+"&writing="+updatewritingstatus);}}function GetWritingStatus() {if (http_request3.readyState == 4) {if (http_request3.status == 200) {if(document.getElementById('writing')){var str = new String(http_request3.responseText);str = str.split("[=]");document.getElementById('writing').innerHTML = str[0];document.getElementById('new_time').innerHTML = str[1];setTimeout('CheckWriting()',2000);}   } else {return false;}}}/*function Writing(){writingnow = E('writingstatus');if(writingnow.value=="0"){if (window.XMLHttpRequest) {http_request4 = new XMLHttpRequest();} else if (window.ActiveXObject) {http_request4 = new ActiveXObject("Microsoft.XMLHTTP");}id=document.getElementById('chatid').value;http_request4.onreadystatechange = UpdateWritingDone;http_request4.open('POST', 'index.php?a=livesupport');http_request4.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');http_request4.send("type=updatewriting&chatid="+id);}}function UpdateWritingDone() {if (http_request4.readyState == 4) {if (http_request4.status == 200) {writingnow = E('writingstatus');} else {return false;}}}*/function CloseLiveSupport(id, confirmmsg, out){if(document.getElementById('chatclosed')){if(document.getElementById('chatclosed').value=="0"){if(out=="2"){if(!confirm(confirmmsg)){document.getElementById('tabs').value='0';document.execCommand("Stop");return false;}else{document.getElementById('tabs').value='1';closemsg = document.getElementById('closewaiting');if(closemsg){closemsg.style.display='';}}}if (window.XMLHttpRequest) {http_request5 = new XMLHttpRequest();} else if (window.ActiveXObject) {http_request5 = new ActiveXObject("Microsoft.XMLHTTP");}http_request5.onreadystatechange = CloseChat;http_request5.open('POST', 'index.php?a=livesupport');http_request5.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');http_request5.send("type=closechat&chatid="+id);if(out=="1"){alert(confirmmsg);}}else{document.getElementById('tabs').value='1';/*return true;*/}}}function CloseChat() {if (http_request5.readyState == 4) {if (http_request5.status == 200) {if(document.getElementById('chatclosed')){document.getElementById('chatclosed').value='1';}} else {return false;}}}function SwitchSound(open, close){if(document.getElementById('sound')){if(document.getElementById('sound').value=="1"){document.getElementById('soundtxt').innerHTML = open;document.getElementById('sound').value=0;}else{document.getElementById('soundtxt').innerHTML = close;document.getElementById('sound').value=1;}}}function GetDuration(){if(document.getElementById('chatclosed').value=="0"){time = E('starttime');date = new Date();timenow = Math.round((date.getTime())/1000);if(time.value==""){time.value = timenow;}time = parseFloat(time.value);seconds = timenow-time;getduration = Duration(seconds);d = E('duration');d.innerHTML = getduration;durationtiming=setTimeout('GetDuration()',1000);}} function Duration(seconds){periods = new Array();periods[0] = 3600;periods[1] = 60;periods[2] = 1;values = new Array();for(p in periods){var count = Math.floor(seconds/periods[p]);if(count==0){values[p] = 0;continue;}plus = '0'+String(count);values[p] = (count<10) ? plus:count;seconds = seconds%periods[p];}str = '('+values[0]+':'+values[1]+':'+values[2]+')';return str;}function RecordCookie(name, value, old){var expdate = new Date();expdate.setDate(expdate.getDate()+30);if(old=="1"){oldvalue = GetCart("shoppingcart");value = oldvalue+"||"+escape(value);}else{value = escape(value);}document.cookie = name+"="+value+"; expires="+expdate.toGMTString(); }function GetCart(cookiename){var content="";cookie_start = document.cookie.indexOf(cookiename+"=");if(cookie_start!==-1){cookie_start = cookie_start + cookiename.length+1;cookie_end = document.cookie.indexOf(";", cookie_start);if(cookie_end==-1){cookie_end = document.cookie.length;}content = unescape(document.cookie.substring(cookie_start, cookie_end));}else{content = "";}return content;} var replacement;function AddToCart(id, order){shoppingcartbox = document.getElementById('shoppingcarttable');shoppingcartbox.className="";str = new String(GetCart("shoppingcart"));added = document.getElementById('addedbefore').value;subadded = document.getElementById('subaddedbefore').value;var dontadd = 0;if(id=="plan"){var order2 = new String(order);order2 = order2.split("_");order2 = order2[0]+"_";if(str.indexOf(id+"-"+order2)!==-1){sub_before = str.split(id+"-"+order2);sub_before = new String(sub_before[1]);sub_order_before = sub_before.split("||");sub_order_before = sub_order_before[0];if(!confirm(subadded)){dontadd = 1;return;}else{replacement=1;RemoveFromCart('cart'+id,id,order2+sub_order_before);replacement=0;}}}if(str.indexOf(id+"-"+order+"||")==-1 && dontadd==0){value = "<div id='cart"+id+order+"' class='' style='display:;'>"+document.getElementById(id+order).innerHTML+"</div>";document.getElementById('shoppingcart').innerHTML += value;cookievalue = id+"-"+order+"||"; RecordCookie("shoppingcart", cookievalue, 1);pricestring = new String(document.getElementById('price'+id+order).innerHTML);pricestring = pricestring.replace('<font class="redmsg">','');price = parseFloat(pricestring);totalstring = new String(document.getElementById('cart_total').innerHTML);totalstring = totalstring.replace('<font>','');totalstring = totalstring.replace('</font>','');total = parseFloat(totalstring);carttotal = total+price;carttotal = RoundIt(carttotal);document.getElementById('cart_total').innerHTML = carttotal;}else{if(dontadd==0){alert(added);}}if(dontadd==0){if(document.getElementById(id+'href'+order)){document.getElementById(id+'href'+order).href = "javascript:CartAlert('"+id+"', '"+order+"');";}if(document.getElementById(id+'image'+order)){imgsrc = new String(document.getElementById(id+'image'+order).src);document.getElementById(id+'image'+order).src = imgsrc.replace("addtocart", "addedtocart");cart_alt = document.getElementById('addedtocartalt');if(cart_alt){document.getElementById(id+'image'+order).alt = cart_alt.value;}}}}function RoundIt(carttotal){carttotal = (Math.round(carttotal*100)/100);return carttotal;}function RemoveFromCart(id, idbefore, order){cartstring = new String(document.getElementById('shoppingcart').innerHTML);var cart='';if(document.getElementById(id+order)){divstr = new String("id='"+id+order+"'");divstr2 = new String("id="+id+order);divstr3 = new String('id="'+id+order+'"');newstr = new String(document.getElementById(id+order).innerHTML);cartstring = cartstring.replace(newstr, "");cartstring = cartstring.replace(divstr2, "");cartstring = cartstring.replace(divstr3, "");cart = cartstring.replace(divstr, "");}value = cart;cartcookie = new String(GetCart("shoppingcart"));toreplace = idbefore+"-"+order;var cookievalue='';cartarray = cartcookie.split("||");carttotal=0;for(i in cartarray){if(cartarray[i]!==""){if(cartarray[i]==toreplace){}else{cookievalue += cartarray[i]+"||";}}}pricestring = new String(document.getElementById('price'+idbefore+order).innerHTML);pricestring = pricestring.replace('<font class="redmsg">', "");pricestring = pricestring.replace('<font>', "");price = parseFloat(pricestring);quantityfield = document.getElementById("quantity"+idbefore+order);if(quantityfield){quantityfield.value = parseFloat(quantityfield.value);if(quantityfield.value>1){price = price*quantityfield.value;}}totalstring = new String(document.getElementById('cart_total').innerHTML);totalstring = totalstring.replace('<font>','');total = parseFloat(totalstring);carttotal = total-price;carttotal = RoundIt(carttotal);document.getElementById('cart_total').innerHTML = carttotal;if(cookievalue=="" && replacement!==1){shoppingcartbox = document.getElementById('shoppingcarttable');shoppingcartdiv = document.getElementById('shoppingcart');shoppingcartdiv.innerHTML = '';shoppingcartbox.className='none';RecordCookie("shoppingcart", "", 0);cart_noitems = document.getElementById('noitems');if(cart_noitems){cart_noitems.className='';}}else{RecordCookie("shoppingcart", cookievalue, 0);document.getElementById('shoppingcart').innerHTML = value;}if(document.getElementById(idbefore+'href'+order)){document.getElementById(idbefore+'href'+order).href = "javascript:AddToCart('"+idbefore+"', '"+order+"');";}if(document.getElementById(idbefore+'image'+order)){imgsrc = new String(document.getElementById(idbefore+'image'+order).src);document.getElementById(idbefore+'image'+order).src = imgsrc.replace("addedtocart", "addtocart");cart_alt = document.getElementById('addtocartalt');if(cart_alt){document.getElementById(idbefore+'image'+order).alt = cart_alt.value;}}}function EmptyCart(msg){if(!confirm(msg)){return;}var cart = new String(GetCart("shoppingcart"));cart = cart.split("||");for(i in cart){var str = cart[i].split("-");hrefelement = str[0]+"href"+str[1];if(document.getElementById(hrefelement)){document.getElementById(hrefelement).href = "javascript:AddToCart('"+str[0]+"', '"+str[1]+"');";}imgelement = str[0]+"image"+str[1];if(document.getElementById(imgelement)){imgsrc = new String(document.getElementById(imgelement).src);document.getElementById(imgelement).src = imgsrc.replace("addedtocart", "addtocart");}RecordCookie("quantity"+str[0]+str[1], "", 0);}shoppingcartbox = document.getElementById('shoppingcarttable');shoppingcartdiv = document.getElementById('shoppingcart');cart_noitems = document.getElementById('noitems');if(cart_noitems){cart_noitems.className='';}shoppingcartdiv.innerHTML = '';shoppingcartbox.className='none';RecordCookie("shoppingcart", "", 0);document.getElementById('cart_total').innerHTML = 0;RecordCookie("shoppingcart_show_hide", 1, 0);}function CheckQuantity(q){allowed = new String("0123456789");quantity = new String(q);quantityletters = quantity.split("");bad = 0;for(i in quantityletters){if(allowed.indexOf(quantityletters[i])==-1){bad = 1;}}if(bad==0){return true;}else{return false;}}function UpdateQuantity(id, order){quantityel = document.getElementById('quantity'+id+order);if(quantityel){quantity = quantityel.value;var badquantity = document.getElementById('badquantity').value;if(!CheckQuantity(quantity) || quantity==0){alert(badquantity);document.getElementById('quantity'+id+order).focus();document.getElementById('quantity'+id+order).value='1';}else{var previous = GetCart("quantity"+id+order);var newprice;if(previous==""){previous=1;}if(quantity!==previous){pricestring = new String(document.getElementById("price"+id+order).innerHTML);pricestring = pricestring.replace('<font class="redmsg">','');pricestring = pricestring.replace('<font>',''); price = parseFloat(pricestring);totalstring = new String(document.getElementById('cart_total').innerHTML);totalstring = totalstring.replace('<font>','');total = parseFloat(totalstring);if(quantity>previous){diff = quantity-previous;newprice = diff*price;newtotal = total+newprice;}else{diff = previous-quantity;newprice = diff*price;newtotal = total-newprice;}new_price = price*quantity;new_price = RoundIt(new_price);element = document.getElementById('currency');/*document.getElementById('cart_total_currency').innerHTML = ''; document.getElementById('cart_total').innerHTML = RoundIt(newtotal)+" "+document.getElementById('currencyoption-'+element.value).innerHTML;*/document.getElementById('cart_total').innerHTML = RoundIt(newtotal);if(quantity>1){document.getElementById("element_total"+id+order).className='';document.getElementById("element_total_price"+id+order).innerHTML = new_price;}else{document.getElementById("element_total"+id+order).className='none';document.getElementById("element_total_price"+id+order).innerHTML = '';}RecordCookie("quantity"+id+order, quantity, 0);}}}}function ChangeCurrency(){element = document.getElementById('currency'); if(element){value = element.value;cartcookie = new String(GetCart("shoppingcart"));cartcookie = cartcookie.split("||");total_price = 0;for(i in cartcookie){if(cartcookie[i]!==""){name = "currency-"+cartcookie[i]+"-"+value;content = document.getElementById(name).innerHTML;currreplaced = document.getElementById('currency'+cartcookie[i]);pricing = new String(cartcookie[i]);pricing = pricing.split("-");pricereplaced = document.getElementById('price'+pricing[0]+pricing[1]);currreplaced.innerHTML = '';pricereplaced.innerHTML = content;UpdateQuantity(pricing[0], pricing[1]);quantityfield = parseFloat(document.getElementById("quantity"+pricing[0]+pricing[1]).value);if(quantityfield>1){if(document.getElementById("element_total_price"+pricing[0]+pricing[1])){pricestring = new String(document.getElementById("element_total_price"+pricing[0]+pricing[1]).innerHTML);pricestring = pricestring.replace('<font class="redmsg">','');pricestring = pricestring.replace('<font>','');pricetoadd = parseFloat(pricestring);}}else{pricestring = new String(document.getElementById("price"+pricing[0]+pricing[1]).innerHTML);pricestring = pricestring.replace('<font class="redmsg">','');pricestring = pricestring.replace('<font>','');pricetoadd = parseFloat(pricestring);}total_price = total_price + pricetoadd;if(document.getElementById('element_total_currency'+pricing[0]+pricing[1])){document.getElementById('element_total_currency'+pricing[0]+pricing[1]).innerHTML = document.getElementById('currencyoption-'+value).innerHTML;}}}document.getElementById('currency_total_'+value).innerHTML = RoundIt(total_price); document.getElementById('cart_total').innerHTML = document.getElementById('currency_total_'+value).innerHTML;document.getElementById('cart_total_currency').innerHTML = document.getElementById('currencyoption-'+value).innerHTML;}}function GoToLink(link){self.location = link;}function ChangeImageVerification(){parent.frames.image.location='index.php?a=imageverification';}function AddBBCode(code, id){codestart = "["+code+"]";codeend = "[/"+code+"]";msgfield = document.getElementById(id);if(msgfield){msgfield.value += '\n'+codestart+'\n'+codeend;}}function TicketDesc(){selectfield = document.getElementById('ticketdescfield');if(selectfield){selectvalue = selectfield.value;var titlefield = document.getElementById('title');var messagefield = document.getElementById('message');titlecontent = document.getElementById('ticket_message_title_'+selectvalue);messagecontent = document.getElementById('ticket_message_template_'+selectvalue);if(selectvalue=='0'){if(titlefield){titlefield.value = "";}if(messagefield){messagefield.value = "";}}if(titlefield && titlecontent){titlefield.value = titlecontent.innerHTML;}if(messagefield && messagecontent){messagefield.value = messagecontent.value;}}}function CartAlert(type, id){msg = document.getElementById('addedbefore').value;if(!confirm(msg)){return;}RemoveFromCart('cart'+type, type, id);}function ShowHideCart(op){cart = E('cartcontent');showlink = E('showcart');hidelink = E('hidecart');if(op==1){if(cart){cart.className='';}if(showlink){showlink.className='none';}if(hidelink){hidelink.className='';}}if(op==0){if(cart){cart.className='none';}if(showlink){showlink.className='';}if(hidelink){hidelink.className='none';}}RecordCookie("shoppingcart_show_hide", op, 0);}function ChangeSubPrice(plan, sub){planelement = document.getElementById(plan);subelement = document.getElementById(sub);if(planelement && subelement){planid = planelement.value;subid = subelement.value;price_element = document.getElementById('renewal_plan_'+planid+'_'+subid);price_span = document.getElementById('sub_price');sub_price_div_e = document.getElementById('sub_price_div');if(price_element && price_span){if(sub_price_div_e){sub_price_div_e.className='';}price_span.innerHTML = price_element.innerHTML;}}}function ChDir(mar,dir){get = document.getElementById('marquee'+mar);if(get){get.direction = dir;}}
