﻿// JavaScript Document
document.charset = "utf-8";
var Layer='';var iLayerMaxNum=1000;var a;document.onmouseup=me;document.onmousemove=ms;var b;var c;
function Move(Object,event){Layer=Object.id;if(document.all){G(Layer).setCapture();b=event.x-G(Layer).style.pixelLeft;c=event.y-G(Layer).style.pixelTop;}else if(window.captureEvents){window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);b=event.layerX;c=event.layerY+100;};if(Layer!="Layer"+a){G(Layer).style.zIndex=iLayerMaxNum;iLayerMaxNum=iLayerMaxNum+1;}};function ms(d){if(Layer!=''){if(document.all){G(Layer).style.left=event.x-b;G(Layer).style.top=event.y-c;}else if(window.captureEvents){G(Layer).style.left=(d.clientX-b)+"px";G(Layer).style.top=(d.clientY-c)+"px";}}};function me(d){if(Layer!=''){if(document.all){G(Layer).releaseCapture();Layer='';}else if(window.captureEvents){window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);Layer='';}}};function Close(n){var e='Layer'+n;G(e).style.display='none';}
function viewDesc(giftId){G("giftDesc_"+giftId).style.display="block";G("viewDesc_"+giftId).style.display="none";}
function hideDesc(giftId){G("giftDesc_"+giftId).style.display="none";G("viewDesc_"+giftId).style.display="block";}
function giftShow(giftId){winPop({title:'礼物查看',url:'?action=show&ishow=1&id='+giftId+'',width:'480',height:'260',ishow:'false'});}
function giftBuy(giftId){winPop({title:'礼物购买',width:'480',height:'175',url:'?action=show&ishow=0&id='+giftId+''});}
function remark(giftId){winPop({title:'签收礼物',width:'480',height:'175',url:'?action=mark&id='+giftId+''});}
function InputName(OriInput, GoalArea){G(GoalArea).innerHTML = OriInput.value;};function savePos(field){if (field.value.length > 100)field.value = field.value.substring(0, 100);else{G("char").innerHTML = 100 - field.value.length;G("note").innerHTML = field.value;G("total").innerHTML=field.value.length;}};
function selSkinID(skinID,mFile,Shape,Position,Color){if (skinID!=''){G('skinid').value=skinID};if (Shape=='rec'){lstr=' rectangle_layout';}if (Shape=='square'){lstr=' square_layout';}if (Position=='up'){lstr=lstr+'Top';}if (Position=='left'){lstr=lstr+'Left';}if (Position=='right'){lstr=lstr+'Right';}if (Position=='under'){lstr=lstr+'Bottom';}if (Position=='in1'){lstr=lstr+'CenterT1';}if (Position=='in2'){lstr=lstr+'CenterT2';}var cstr=' color'+Color;G('preview').className='script_body'+lstr+cstr;G('preview').style.background='no-repeat url('+mFile+')';};function showall(){winPop({title:'字条精选',width:'480',height:'240',url:'?action=select',ishow:'false'})};
function setStr(id){str=G(id+'_title').title;if (str.length > 100)str = str.substring(0, 100);else{parent.G("char").innerHTML = 100 - str.length;parent.G("note").innerHTML =str;parent.G("total").innerHTML=str.length;parent.G("Content").value = str;};}
function friend(){winPop({title:'我的好友',width:'480',height:'240',url:'/users/friend.asp?action=popup',ishow:'false'})}function buySkin(id){winPop({title:'购买装饰',url:'?action=ctrl&useraction=3&id='+id})};function Close(n){var e='Layer'+n;G(e).style.display='none';};function Show_0(id){winPop({title:'查看字条',width:'360',height:'458',url:'?action=show&id='+id,ishow:'false'})};function Show_1(id){winPop({title:'查看字条',width:'380',height:'390',url:'?action=show&id='+id,ishow:'false'})}
function ctrlfile(action,parentid,id,title){url='?action=ctrl&useraction='+action+'&parentid='+parentid+'&id='+id+'';return winPop({title:title,url:url});}
