1 <SCRIPT LANGUAGE="JScript">
3 function fnGetInfo(dropElem, myurl) {
4 event.returnValue = false;
5 event.dataTransfer.dropEffect = "none";
6 myData = event.dataTransfer.getData("Text");
7 myData = myData.split('?');
10 event.dataTransfer.clearData("Text");
11 this.location=''+myurl+'?'+myID+'='+myType;
12 this.status='url:'+myurl+' data'+myData;
14 function fnCancelDefault(validObj, effect) {
15 myData = event.dataTransfer.getData("Text");
16 myData = myData.split('?');
19 if ((validObj.indexOf(myType) != -1) || (validObj == '*')) {
20 event.returnValue = false;
21 event.dataTransfer.dropEffect = effect;
24 event.returnValue = false;
25 event.dataTransfer.dropEffect = "none";
28 function dropFieldSwapColor(obj,doLight) {
29 if (!obj.bgColor && !obj.activeColor && !obj.inactiveColor) return false;
30 if (doLight && event.dataTransfer.dropEffect == 'none') return false;
32 if (!obj.isColorsSet) {
33 obj.inactiveColor = obj.bgColor;
34 obj.isColorsSet = true;
39 obj.bgColor = obj.activeColor;
40 else if (obj.inactiveColor)
41 obj.bgColor = lighterColor(obj.inactiveColor);
44 if (obj.inactiveColor)
45 obj.bgColor = obj.inactiveColor;
47 obj.removeAttribute("bgColor");
51 var lightAddition = 20;
52 var hex = '0123456789ABCDEF';
53 function convertHexToDec(h) {
54 h1 = hex.indexOf(h.substr(0,1).toUpperCase());
55 h2 = hex.indexOf(h.substr(1,1).toUpperCase());
56 return (h1 * 16 + h2);
58 function convertDecToHex(d) {
59 if (d >= 255) return 'FF';
60 if (d <= 0) return '00';
61 d2 = d % 16; d1 = parseInt((d-d2) / 16);
62 return hex.substr(d1,1)+hex.substr(d2,1);
64 function lighterColor(c) {
66 if ((c.length != 7) || (c.substr(0,1) != '#')) return c;
67 r = convertDecToHex(convertHexToDec(c.substr(1,2)) + lightAddition);
68 g = convertDecToHex(convertHexToDec(c.substr(3,2)) + lightAddition);
69 b = convertDecToHex(convertHexToDec(c.substr(5,2)) + lightAddition);