﻿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 listfriend(t){pop=new Popup({ contentType:1, isReloadOnClose:false, width:400, height:250 });pop.setContent("title","好友选择");pop.setContent("contentUrl",'/my/apply.asp?action=selectuser&type='+t+'');pop.build();pop.show();};function view_all(){pop=null;pop=new Popup({ contentType:1, isReloadOnClose:false, width:500, height:270 });pop.setContent("title","字条精选");pop.setContent("contentUrl",'?action=all');pop.build();pop.show();};function submitForm(){pop=null;pop=new Popup({ contentType:1,isReloadOnClose:false,width:380,height:80});pop.setContent("title","编辑字条");pop.setContent("contentUrl","");pop.build();pop.show();G("form").target=pop.iframeIdName;};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 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 buySkin(id){pop=null;pop=new Popup({ contentType:1, isReloadOnClose:false, width:380, height:80 });pop.setContent("title","背景购买");pop.setContent("contentUrl",'?action=buy&id='+id+'');pop.build();pop.show();};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 Show(id){pop=new Popup({ contentType:1, isReloadOnClose:false, width:380, height:470 });pop.setContent("title","字条查看");pop.setContent("contentUrl",'?action=view&id='+id+'');pop.build();pop.show();}