<script language="JavaScript"> <!-- var newwin=null; function inithandle() { handle.style.left=(box.offsetWidth-handle.offsetWidth)/2+10; handle.style.top=(box.offsetHeight-handle.offsetHeight)/2+10; if (newwin!=null) newwin.moveTo((screen.Width-newwin.window.document.body.offsetWidth)/2,(screen.Height-newwin.window.document.body.offsetHeight)/2); }
var url='temp.htm'; function openwin() { inithandle(); if (newwin==null) { newwin=window.open(url,'newwin','fullscreen=yes');openbutton.disabled=true;closebutton.disabled=false;} var w=screen.Width/box.offsetWidth*handle.offsetWidth; var h=screen.Height/box.offsetHeight*handle.offsetHeight; newwin.resizeTo(w,h); var l=(screen.Width-w)/2; var t=(screen.Height-h)/2; newwin.moveTo(l,t); } var dragenable=0; var obj; var dx0; var dy0; function dragstart(objname) { obj=objname; dragenable=1; dx0=document.body.scrollLeft+event.clientX-obj.offsetLeft; dy0=document.body.scrollTop+event.clientY-obj.offsetTop; }
function draglayer() { if (dragenable==1) { obj.setCapture(); var x=document.body.scrollLeft+event.clientX-dx0; var y=document.body.scrollTop+event.clientY-dy0; if (x>box.offsetLeft && x<box.offsetLeft+box.offsetWidth-obj.offsetWidth && y>box.offsetTop && y<box.offsetTop+box.offsetHeight-obj.offsetHeight) { obj.style.left=x; obj.style.top=y; } else if (x<box.offsetLeft) { obj.style.left=box.offsetLeft; if (y<box.offsetTop) { obj.style.top=box.offsetTop; } else if (y>box.offsetTop+box.offsetHeight-obj.offsetHeight) { obj.style.top=box.offsetTop+box.offsetHeight-obj.offsetHeight; } else { obj.style.top=y; } } else if (x>box.offsetLeft+box.offsetWidth-obj.offsetWidth) { obj.style.left=box.offsetLeft+box.offsetWidth-obj.offsetWidth; if (y<box.offsetTop) { obj.style.top=box.offsetTop; } else if (y>box.offsetTop+box.offsetHeight-obj.offsetHeight) { obj.style.top=box.offsetTop+box.offsetHeight-obj.offsetHeight; } else { obj.style.top=y; } } else { obj.style.left=x; if (y<box.offsetTop) { obj.style.top=box.offsetTop; } else if (y>box.offsetTop+box.offsetHeight-obj.offsetHeight) { obj.style.top=box.offsetTop+box.offsetHeight-obj.offsetHeight; } else { obj.style.top=y; } } if (newwin!=null){ newwin.moveTo((obj.offsetLeft-10)*screen.Width/box.offsetWidth,(obj.offsetTop-10)*screen.Height/box.offsetHeight); } } }
function dragend() { dragenable=0; obj.releaseCapture(); }
function changesize(zoomvalue) { if (zoomvalue=='+' && handle.offsetWidth<200) { handle.style.pixelWidth+=4; handle.style.pixelHeight=handle.offsetWidth/box.offsetWidth*box.offsetHeight; } if (zoomvalue=='-' && handle.offsetWidth>28) { handle.style.pixelWidth-=4; handle.style.pixelHeight=handle.offsetWidth/box.offsetWidth*box.offsetHeight; } if (zoomvalue=='0') { handle.style.width=28; handle.style.height=21; } if (newwin!=null){ var w=screen.Width/box.offsetWidth*handle.offsetWidth; var h=screen.Height/box.offsetHeight*handle.offsetHeight; newwin.resizeTo(w,h); } inithandle(); }
function setbg() { if (newwin!=null){ if(bgcolorvalue.value!=''){newwin.document.body.style.backgroundColor="#"+bgcolorvalue.value;handle.style.backgroundColor="#"+bgcolorvalue.value;} newwin.document.body.style.backgroundImage='url('+bgimgvalue.value+')'; } }
function setborder() { if (newwin!=null){ if(bordercolorvalue.value!=''){newwin.document.body.style.borderColor="#"+bordercolorvalue.value;handle.style.borderColor="#"+bordercolorvalue.value;} if(borderwidthvalue.value=='0'){newwin.document.body.style.borderWidth=borderwidthvalue.value;handle.style.borderWidth=0;} else if(borderwidthvalue.value!=''){newwin.document.body.style.borderWidth=borderwidthvalue.value;handle.style.borderWidth=1;} if(bordercolorvalue.value!=''){newwin.document.body.style.borderStyle=borderstylevalue.value;handle.style.borderStyle=borderstylevalue.value;} } }
function setmargin() { if (newwin!=null){ if(marginvalue.value!=''){newwin.document.body.style.margin=marginvalue.value;} } }
function setscroll() { if (newwin!=null){ if(checkscroll.checked) {newwin.document.body.scroll='yes';} else {newwin.document.body.scroll='no';} } }
function setbgfix() { if (newwin!=null){ if(checkfix.checked) {newwin.document.body.style.backgroundAttachment='fixed';} else {newwin.document.body.style.backgroundAttachment='scroll';} } }
function setbgrepeat() { if (newwin!=null){ if(checkrepeat.checked) {newwin.document.body.style.backgroundRepeat='no-repeat';} else {newwin.document.body.style.backgroundRepeat='repeat';} } }
var trackrepeat; function showtrack() { handle.style.visibility='hidden'; trackbox.style.visibility='visible'; drawbox.style.visibility='visible'; }
function playtrack() { handle.style.visibility='visible'; trackbox.style.visibility='hidden'; drawbox.style.visibility='hidden'; if (playtrackbutton.value=='Play Track') {showtrackbutton.disabled=true;playtrackbutton.value='Stop Track';playnode(axiscount2);} else {clearTimeout(trackrepeat);showtrackbutton.disabled=false;playtrackbutton.value='Play Track';}
}
var axis=new Array(); var axiscount=0; var axiscount2=0; var drawenable=0; var drawenable2=0;
function initnode() { drawenable=1; }
function drawnode() { if (drawenable==1 && drawenable2==1) { playtrackbutton.disabled=true; var tempx=document.body.scrollLeft+event.clientX-trackbox.offsetLeft; var tempy=document.body.scrollTop+event.clientY-trackbox.offsetTop; if (tempx>-1 && tempx<trackbox.offsetWidth-1 && tempy>-1 && tempy<trackbox.offsetHeight-1) { axis[axiscount]=tempx; axis[axiscount+1]=tempy; if (axiscount%4==0 && axiscount%20!=0) trackbox.innerHTML+='<img src=http://www.haosc.com/wytx/104/images/spacer.gif width=1 height=1 style="background-color:#999999;position:absolute;left:'+axis[axiscount]+';top:'+axis[axiscount+1]+'">'; if (axiscount%20==0) trackbox.innerHTML+='<img src=http://www.haosc.com/wytx/104/images/spacer.gif width=2 height=2 style="background-color:#FF0000;position:absolute;left:'+axis[axiscount]+';top:'+axis[axiscount+1]+'">'; axiscount+=2; trackbox.setCapture(); } } }
function playnode(i) { if (i<axis.length) { handle.style.left=axis[i]-14+trackbox.offsetLeft; handle.style.top=axis[i+1]-11+trackbox.offsetTop; if (newwin!=null){ newwin.moveTo((handle.offsetLeft-10)*screen.Width/box.offsetWidth,(handle.offsetTop-10)*screen.Height/box.offsetHeight); } axiscount2+=2; trackrepeat=setTimeout('playnode('+axiscount2+')',10); } else {axiscount2=0;showtrackbutton.disabled=false;playtrackbutton.value='Play Track';clearTimeout(trackrepeat);} }
function endnode() { drawenable=0; drawenable2=0; drawbox.style.visibility='visible'; trackbox.releaseCapture(); playtrackbutton.disabled=false; }