1 /* automatically generated from WEDropScript.js, do not edit ! */
2 @"<SCRIPT LANGUAGE=\"JScript\">\n"
4 @"function fnGetInfo(dropElem, myurl) {\n"
5 @" event.returnValue = false;\n"
6 @" event.dataTransfer.dropEffect = \"none\";\n"
7 @" myData = event.dataTransfer.getData(\"Text\");\n"
8 @" myData = myData.split('?');\n"
9 @" myType = myData[1];\n"
10 @" myID = myData[0];\n"
11 @" event.dataTransfer.clearData(\"Text\");\n"
12 @" this.location=''+myurl+'?'+myID+'='+myType;\n"
13 @" this.status='url:'+myurl+' data'+myData;\n"
15 @"function fnCancelDefault(validObj, effect) {\n"
16 @" myData = event.dataTransfer.getData(\"Text\");\n"
17 @" myData = myData.split('?');\n"
18 @" myType = myData[1];\n"
19 @" myID = myData[0];\n"
20 @" if ((validObj.indexOf(myType) != -1) || (validObj == '*')) {\n"
21 @" event.returnValue = false;\n"
22 @" event.dataTransfer.dropEffect = effect;\n"
25 @" event.returnValue = false;\n"
26 @" event.dataTransfer.dropEffect = \"none\";\n"
29 @"function dropFieldSwapColor(obj,doLight) {\n"
30 @" if (!obj.bgColor && !obj.activeColor && !obj.inactiveColor) return false;\n"
31 @" if (doLight && event.dataTransfer.dropEffect == 'none') return false;\n"
32 @" if (!obj.isColorsSet) {\n"
33 @" obj.inactiveColor = obj.bgColor;\n"
34 @" obj.isColorsSet = true;\n"
37 @" if (obj.activeColor)\n"
38 @" obj.bgColor = obj.activeColor;\n"
39 @" else if (obj.inactiveColor)\n"
40 @" obj.bgColor = lighterColor(obj.inactiveColor);\n"
43 @" if (obj.inactiveColor)\n"
44 @" obj.bgColor = obj.inactiveColor;\n"
46 @" obj.removeAttribute(\"bgColor\");\n"
50 @"var lightAddition = 20;\n"
51 @"var hex = '0123456789ABCDEF';\n"
52 @"function convertHexToDec(h) {\n"
53 @" h1 = hex.indexOf(h.substr(0,1).toUpperCase());\n"
54 @" h2 = hex.indexOf(h.substr(1,1).toUpperCase());\n"
55 @" return (h1 * 16 + h2);\n"
57 @"function convertDecToHex(d) {\n"
58 @" if (d >= 255) return 'FF';\n"
59 @" if (d <= 0) return '00';\n"
60 @" d2 = d % 16; d1 = parseInt((d-d2) / 16);\n"
61 @" return hex.substr(d1,1)+hex.substr(d2,1);\n"
63 @"function lighterColor(c) {\n"
64 @" if (!c) return c;\n"
65 @" if ((c.length != 7) || (c.substr(0,1) != '#')) return c;\n"
66 @" r = convertDecToHex(convertHexToDec(c.substr(1,2)) + lightAddition);\n"
67 @" g = convertDecToHex(convertHexToDec(c.substr(3,2)) + lightAddition);\n"
68 @" b = convertDecToHex(convertHexToDec(c.substr(5,2)) + lightAddition);\n"
69 @" return '#'+r+g+b;\n"