1function fnPlaceData(url,nType,sName) { 2 try { 3 var xmlDoc = dbsRequest(url); 4 if (xmlDoc != null) { 5 var sHTML = "" 6 for (var nFields = 0; nFields < xmlDoc.childNodes.length; nFields++) { 7 if (nType == 5) { 8 //sHTML += "<option value=\""+dbsGetNodeText(xmlDoc.childNodes[nFields].childNodes[0])+"\">"+dbsGetNodeText(xmlDoc.childNodes[nFields].childNodes[0])+"</option>" 9 document.getElementById(sName).options[document.getElementById(sName).options.length]=new Option(dbsGetNodeText(xmlDoc.childNodes[nFields].childNodes[0]), dbsGetNodeText(xmlDoc.childNodes[nFields].childNodes[0]), false, false); 10 } 11 12 else if (nType == 4) { 13 if (nFields > 0) 14 sHTML += " "; 15 sHTML += "<nobr><input style=\"height:15px;\" type=\"checkbox\" name=\"" + sName + "\" value=\"" + dbsGetNodeText(xmlDoc.childNodes[nFields].childNodes[0]) + "\" id=\"fld" + nType+""+nFields + "\"><label for=\"fld" + nType+""+nFields + "\">" + dbsGetNodeText(xmlDoc.childNodes[nFields].childNodes[0]) + "</label></nobr>"; 16 } 17 18 else if (nType == 3) { 19 if (nFields > 0) 20 sHTML += " "; 21 sHTML += "<nobr><input style=\"height:15px;\" type=\"radio\" name=\"" + sName + "\" value=\"" + dbsGetNodeText(xmlDoc.childNodes[nFields].childNodes[0]) + "\" id=\"fld" + nType+""+nFields + "\"><label for=\"fld" + nType+""+nFields + "\">" + dbsGetNodeText(xmlDoc.childNodes[nFields].childNodes[0]) + "</label></nobr>"; 22 } 23 } 24 if (nType == 4 || nType == 3) 25 document.write(sHTML); 26 /*else 27 document.getElementById(sName).innerHTML = sHTML;*/ 28 } 29 } catch (e) { 30 } 31} 32 33function expand_bar(bar_Id) { 34 var bar = document.getElementById("bar_"+bar_Id); 35 if (bar != null) { 36 bar.style.display = ("block" == bar.style.display ? "none" : "block"); 37 /*for (i=1;i<bar_length;i++){ 38 if (i!=bar_Id){ 39 bar = document.getElementById("bar_"+i); 40 bar.style.display = 'none'; 41 } 42 }*/ 43 } 44} 45 46function changeClass(obj,opr) { 47 if (opr==1) { 48 obj.style.font = "bold 12px"; 49 obj.style.color = "#ff9393"; 50 } 51 else { 52 obj.style.font = "bold 12px"; 53 obj.style.color = "#000000"; 54 } 55} 56 57function fnSetQuickNavAction(oFrm) { 58 var oSelect = oFrm.SelAction; 59 var sValue = oSelect[oSelect.selectedIndex].value; 60 if (sValue != "-1") { 61 var saValue = sValue.split("||"); 62 if (saValue[0] == "1") 63 window.open(saValue[1],"_blank"); 64 else 65 window.location = saValue[1]; 66 } 67 else { 68 oSelect.selectedIndex = 0; 69 } 70 return false; 71} 72 73function fnShowFullImg(sFile) { 74 if (sFile.toLowerCase().indexOf("/_cut/") != -1) { 75 var sFileTemp = sFile.toLowerCase().replace("_cut/",""); 76 var nPos = sFileTemp.lastIndexOf("/"); 77 var sFileName = sFileTemp.substr(nPos+1,sFile.length-nPos); 78 if (sFileName.length > 13) { 79 sFileName = sFileName.substr(13,sFileName.length-13); 80 var sFilePath = sFile.substr(0,nPos+1); 81 sFile = sFilePath + sFileName; 82 } 83 } 84 window.open(sAppDomain + "/ViewImage.asp?Image="+sFile,"image","top=50,left=50,width="+(screen.availWidth-100)+",height="+(screen.availHeight-100)+",scrollbars"); 85 //window.open("ViewImage.asp?Image="+sFile,"image","fullscreen=1,scrollbars,scrollbars"); 86} 87 88function fnShowArtFullImg(nCategoryID, nArticleID) { 89 window.open(sAppDomain + "/ViewImage.asp?CategoryID="+nCategoryID+"&ArticleID="+nArticleID,"image","top=50,left=50,width="+(screen.availWidth-100)+",height="+(screen.availHeight-100)+",scrollbars"); 90 //window.open("ViewImage.asp?Image="+sFile,"image","fullscreen=1,scrollbars,scrollbars"); 91} 92 93function fnShowGalleryFullImg(sFile, nID, nCategoryID) { 94 //window.open("ViewGalleryImage.asp?Image="+sFile,"image","top=50,left=50,width="+(screen.availWidth-100)+",height="+(screen.availHeight-100)+",scrollbars"); 95 window.open(sAppDomain + "/ViewGalleryImage.asp?ArticleID="+nID+"&CategoryID="+nCategoryID+"&Image="+sFile,"image","fullscreen=1,scrollbars,scrollbars"); 96} 97 98function fnShowGallery(iCatID,iArticleID) { 99 window.open(sAppDomain + "/ViewGallery.asp?CategoryID="+iCatID+"&ArticleID="+iArticleID,"gallery","top=50,left=50,width="+(screen.availWi
99dth-100)+",height="+(screen.availHeight-100)+",scrollbars=no"); 100} 101 102function dbsSetURL(sName) { 103 if(window.location.hash==sName && !window.ActiveXObject) 104 window.location.hash=""; 105 window.location.hash = sName.replace("#",""); 106} 107 108function dbsMail(box,server) { 109 window.location = "mailto:" + box + "@" + server; 110} 111 112function fnSetQuickNavState(sCatID) { 113 var selQuickNav = document.getElementById("ctlQuickNav"); 114 for (var i=0; i<selQuickNav.options.length; i++) { 115 if (selQuickNav.options[i].id == "opt" + sCatID) { 116 selQuickNav.options[i].selected = true; 117 break; 118 } 119 } 120} 121 122function fnTalkBack(nCategoryID,nArticleID,sTitle) { 123 window.open(sAppDomain + "/_TalkBack/AddResponse.asp?CategoryID=" + nCategoryID + "&ArticleID=" + nArticleID + "&Title=" + sTitle,"talkback","top=60,left=30,scrollbars=1,resizable=1,width=400,height=492") 124} 125 126function fnTellFriend(sURL,sCategoryID,sTitle) { 127 window.open(sAppDomain + "/TellFriendPopUp.asp?CategoryID="+sCategoryID+"&URL="+escape(sURL) + "&Title=" + sTitle,"tellfriend","top=60,left=30,scrollbars=1,resizable=1,width=400,height=450") 128} 129 130function fnOpenWin(sURL,nWidth,nHeight) { 131 window.open(sURL,"tellfriend","top="+((window.screen.height-nHeight)/2)+",left="+((window.screen.width-nWidth)/2)+",width="+nWidth+",height="+nHeight+",scrollbars") 132} 133 134function dbsGetContent(sModule,vParam,sPg,sCategoryID,sArticleID) { 135 try { 136 var xmlHTTP; 137 // code for IE 138 if (window.ActiveXObject) { 139 xmlHTTP = new ActiveXObject("Microsoft.XMLHTTP"); 140 xmlHTTP.open("GET","_modules/XML/"+sModule+".asp?pg="+sPg+"&CategoryID="+sCategoryID+"&Param="+vParam+"&ArticleID="+sArticleID+"&DMode=1", false); 141 xmlHTTP.send(); 142 document.write(xmlHTTP.responseXML.documentElement.text); 143 } 144 // code for Mozilla, etc. 145 else if (window.XMLHttpRequest) { 146 xmlHTTP = new XMLHttpRequest(); 147 xmlHTTP.open("GET","_modules/XML/"+sModule+".asp?pg="+sPg+"&CategoryID="+sCategoryID+"&Param="+vParam+"&ArticleID="+sArticleID+"&DMode=1", false); 148 xmlHTTP.send(null); 149 document.write(xmlHTTP.responseXML.documentElement.textContent); 150 } 151 } 152 catch (e) { 153 } 154} 155 156function fnHTTPGetRequest(sURL) { 157 try { 158 var xmlHTTP; 159 // code for IE 160 if (window.ActiveXObject) { 161 xmlHTTP = new ActiveXObject("Microsoft.XMLHTTP"); 162 xmlHTTP.open("GET",sURL, false); 163 xmlHTTP.send(); 164 return xmlHTTP; 165 } 166 // code for Mozilla, etc. 167 else if (window.XMLHttpRequest) { 168 xmlHTTP = new XMLHttpRequest(); 169 xmlHTTP.open("GET",sURL, false); 170 xmlHTTP.send(null); 171 return xmlHTTP; 172 } 173 } 174 catch (e) { 175 return null; 176 } 177} 178 179/******************************** Horizontal Navigation Functions *********************************/ 180var interval, oCurrentDiv; 181function fnShowNodes(td, ID, sDir) { 182 var oDiv = document.getElementById("Sub_"+ID); 183 if (oDiv != null) { 184 oDiv.style.display = "block"; 185 oDiv.style.top = td.offsetHeight + td.offsetTop - oDiv.offsetParent.offsetTop + "px"; 186 if (sDir == "rtl") 187 oDiv.style.left = td.offsetLeft - (oDiv.offsetWidth-td.offsetWidth) - oDiv.offsetParent.offsetLeft + "px"; 188 else 189 oDiv.style.left = td.offsetLeft - oDiv.offsetParent.offsetLeft + "px"; 190 } 191} 192 193function fnHideNodes(ID) { 194 var oDiv = document.getElementById("Sub_"+ID); 195 if (oDiv != null) { 196 oDiv.style.display = "none"; 197 } 198} 199 200 201/******************************** Fixing Flash Problemi in IE *********************************/ 202// Universal event handler 203// Please don't use "onload = functionName" etc 204// use instead this "addEvent(window, 'load', functionName);" 205function dbsAddEvent(obj, strEvent, objFunction) 206{ 207 if (obj.addEventListener) { 208 obj.addEventListener(strEvent, objFunction, true); 209 return true; 210 } 211 else if (obj.attachEvent) { 212 var returnValue = obj.attachEvent("on"+strEvent, objFunction); 213 return returnValue; 214 } 215 else return false; 216} 217 218function dbsRemoveEvent(obj, strEvent, objFunction) 219{ 220 if (obj.addEventListener) { 221 obj.removeEventListener(strEvent, objFunction, true) 222 } 223 else if (obj.attachEvent) { 224 obj.detachEvent("on"+strEvent, objFunction); 225 } 226} 227 228// be careful: this script erases the "FlashVars" content, 229// you can send vars in the file name after "?" like in asp 230function startObjects() 231{ 232 objects = document.getElementsByTagName("OBJECT"); 233 for (var i = 0; i < objects.length; i++) 234 { 235 if (objects[i].classid.toUpperCase() == "CLSID:D27CDB6E-AE6D-11CF-96B8-444553540000" || objects[i].type.toLowerCase() == "application/x-shockwave-flash") 236 objects[i].outerHTML = objects[i].outerHTML; 237 } 238} 239 240if (navigator.appName == "Microsoft Internet Explorer") { 241 //dbsAddEvent(window, 'load', startObjects); 242} 243/******************************** Content Rating *********************************/ 244 245function fncRate(nItemID,nCategoryID,nRating,nAverage) { 246 var xmlDoc = dbsRequest("_TalkBack/RateContent.asp?ItemID=" + nItemID + "&Item
246CategoryID=" + nCategoryID + "&Rating=" + nRating) 247 if (xmlDoc != null) { 248 var sResult = dbsGetNodeText(xmlDoc); 249 250 if (!isNaN(sResult)) { 251 nAverage = parseInt(sResult); 252 if (nAverage != 0) { 253 var sStars = ""; 254 for (var nStars=1; nStars<=5; nStars++) { 255 var ctlRating = document.getElementById("ctlRating_"+nItemID+"_"+nStars); 256 if (ctlRating != null) { 257 var sHTML; 258 if (nStars <= nAverage) 259 sHTML = "<img src=\"_Pics/RatingFullStar.gif\" border=\"0\" alt=\" " + fnGetRatingMsg(nStars) + " \">"; 260 else 261 sHTML = "<img src=\"_Pics/RatingStar.gif\" border=\"0\" alt=\" " + fnGetRatingMsg(nStars) + " \">"; 262 263 ctlRating.innerHTML = sHTML; 264 } 265 } 266 var ctlRatingsCount = document.getElementById("ctlRatingsCount_"+nItemID); 267 if (ctlRatingsCount != null) { 268 var sText = ctlRatingsCount.innerText; 269 if (isNaN(sText)) 270 ctlRatingsCount.innerText = "1"; 271 else 272 ctlRatingsCount.innerText = parseInt(ctlRatingsCount.innerText)+1; 273 } 274 document.getElementById("ctlRatingsPannelContainer_"+nItemID).onmouseout = null; 275 document.getElementById("ctlRatingTitle_"+nItemID).innerHTML = sRatingMsg; 276 } 277 } 278 else 279 fnSetFullStars(nItemID,nAverage); 280 } 281} 282 283function fnGetRatingMsg(nRate) { 284 if (nRate == 1) 285 return sOneStarMsg; 286 else if (nRate == 2) 287 return sTwoStarsMsg; 288 else if (nRate == 3) 289 return sThreeStarsMsg; 290 else if (nRate == 4) 291 return sFourStarsMsg; 292 else if (nRate == 5) 293 return sFiveStarsMsg; 294} 295 296function fnSetFullStars(nItemID, nRatingCount) { 297 for (var nStars=1; nStars<=5; nStars++) { 298 var oImg = document.getElementById("imgRate_"+nItemID+"_"+nStars); 299 if (oImg != null) { 300 if (nStars <= nRatingCount) { 301 oImg.src = "_Pics/RatingFullStar.gif"; 302 } 303 else { 304 oImg.src = "_Pics/RatingStar.gif"; 305 } 306 } 307 } 308} 309 310function fnSetStars(nItemID,nAverage) { 311 for (var nStars=1; nStars<=5; nStars++) { 312 var oImg = document.getElementById("imgRate_"+nItemID+"_"+nStars); 313 if (oImg != null) { 314 if (nStars <= nAverage) { 315 oImg.src = "_Pics/RatingFullStar.gif"; 316 } 317 else { 318 oImg.src = "_Pics/RatingStar.gif"; 319 } 320 } 321 } 322} 323 324function fnPrintFlash(sFileURL, nWidth, nHeight,id) { 325 if (window.ActiveXObject) 326 document.write("<object type=\"application/x-shockwave-flash\" id=\"" + id + "\" width=\"" + nWidth + "\" height=\""+ nHeight + "\">"); 327 else 328 document.write("<object type=\"application/x-shockwave-flash\" id=\"" + id + "\" width=\"" + nWidth + "\" height=\""+ nHeight + "\" data=\"" + sFileURL + "\">"); 329 document.write("<param name=\"movie\" value=\"" + sFileURL + "\">"); 330 document.write("<param name=\"quality\" value=\"high\">"); 331 document.write("<param name=\"wmode\" value=\"transparent\">"); 332 document.write("</object>"); 333} 334 335function fnPrintFlashHTML(html) { 336 document.write(html); 337} 338 339function fnPrintFlashAdv(sFileURL, nWidth, nHeight,id, sFVars) { 340 fnPrintFlashAdv1(sFileURL, nWidth, nHeight,id, sFVars, true); 341} 342 343function fnPrintFlashAdv1(sFileURL, nWidth, nHeight,id, sFVars, bTransparent) { 344 if (window.ActiveXObject) 345 document.write("<object type=\"application/x-shockwave-flash\" id=\"" + id + "\" width=\"" + nWidth + "\" height=\""+ nHeight + "\">"); 346 else 347 document.write("<object FlashVars=\"" + sFVars + "\" type=\"application/x-shockwave-flash\" id=\"" + id + "\" width=\"" + nWidth + "\" height=\""+ nHeight + "\" data=\"" + sFileURL + "\">"); 348 document.write("<param name=\"movie\" value=\"" + sFileURL + "\">"); 349 document.write("<param name=\"quality\" value=\"high\">"); 350 if (bTransparent) 351 document.write("<param name=\"wmode\" value=\"transparent\">"); 352 document.write("<param name=\"FlashVars\" value=\"" + sFVars + "\">"); 353 document.write("</object>"); 354} 355 356// Cache Ratings images 357var dbsRatingStar = new Image(); 358 dbsRatingStar.src ="_Pics/RatingStar.gif"; 359var dbsRatingFullStar = new Image(); 360 dbsRatingFullStar.src ="_Pics/RatingFullStar.gif"; 361 362function fnFilterStates(nCountryID, nStateID, ctlID) { 363 var ctlStates = document.getElementById(ctlID); 364 if (ctlStates != null) { 365 var xmlDoc = dbsRequest("_Subscription/GetStates.asp?CountryID=" + nCountryID); 366 if (xmlDoc != null) { 367 ctlStates.options.length = 0; 368 if (xmlDoc.hasChildNodes()) { 369 var oStates = xmlDoc.getElementsByTagName("state"); 370 for (var nStates=0; nStates<oStates.length; nStates++) { 371 var sStateID = dbsGetAttributeText(oStates[nStates],0); 372 var sStateTitle = dbsGetAttributeText(oStates[nStates],1); 373 var bSelected = (nStateID.toString() == dbsGetAttributeText(oStates[nStates],0)); 374 375 var oOption = new Option(sStateTitle,sStateID); 376 ctlStates.options.length++; 377 ctlStates.options[ctlStates.options.length-1] = oOption; 378 ctlStates.options[ctlStates.options.length-1].selected = bSelected; 379 } 380 ctlStates.disabled = false; 381 } 382 else { 383 ctlStates.disabled = true; 384 var oOption = new Option("none",""); 385 ctlStates.options.length++; 386 ctlStates.options[ctlStates.options.length-1] = oOption; 387 } 388 } 389 } 390} 391 392 393function fnSetDefaultFormData(oFrm) { 394 try { 395 var xmlDoc = dbsRequest(sAppDomain+"/GetUserDetails.asp"); 396 for (var nAttributes = 0; nAttributes < xmlDoc.attributes.length; nAttributes++) { 397 if (document.getElementById(xmlDoc.attributes[nAttributes].name)) { 398 if (dbsGetAttributeText(xmlDoc, nAttributes) != "") 399 document.getElementById(xmlDoc.attributes[nAttributes].name).value = dbsGetAttributeText(xmlDoc, nAttributes); 400 } 401 } 402 } catch (e) { 403 } 404} 405 406function fnPrintWin(URL) { 407 window.open(URL,"_blank"); 408} 409 410function fnShowSelectElemByClass(sClassName) { 411 if (dbsBrowserType == "ie") { 412 var colList = document.getElementsByTagName("SELECT"); 413 for (var i=0; i<colList.length; i++) { 414 if (colList[i].className.toLowerCase() == sClassName.toLowerCase() || sClassName == "") { 415 colList[i].style.visibility = "visible"; 416 } 417 } 418 } 419} 420 421function fnHideSelectElemByClass(sClassName) { 422 if (dbsBrowserType == "ie") { 423 var colList = document.getElementsByTagName("SELECT"); 424 for (var i=0; i<colList.length; i++) { 425 if (colList[i].className.toLowerCase() == sClassName.toLowerCase() || sClassName == "") { 426 colList[i].style.visibility = "hidden"; 427 } 428 } 429 } 430} 431 432function fnSetDir(ctl) { 433 var pat = "[\u0000- !-@[-`{-\u00bf\u00d7\u00f7\u02b9-\u02ff\u2000-\u2bff]"; 434 var ltrRegEx = new RegExp("^"+pat+"*([0-9]"+pat+"*$|[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u2c00-\ufb1c\ufdfe-\ufe6f\ufefd-\uffff])"); 435 var rtlRegEx = new RegExp("^"+pat+"*$"); 436 437 var val = ctl.value; 438 ctl.dir = ltrRegEx.test(val)?"ltr":(rtlRegEx.test(val)?"":"rtl") 439} 440 441function fnPrintFlashPlaceHolder(width,height) { 442 return; 443} 444 445function fnPlayPauseTicker(ctlId ,stopMsg, startMsg, id) 446{ 447 var marq = document.getElementById("ctlTicker"+ctlId); 448 if (marq != null) 449 { 450 var img = document.getElementById("ImgPlayPause"+ctlId); 451 if (marq.stopped) 452 { 453 img.src = sAppDomain + "/_Pics/PauseTicker.png"; 454 marq.start(); 455 marq.stopped = false; 456 img.alt = startMsg; 457 eval("bTicker"+id+"Stopped=false"); 458 } 459 else 460 { 461 img.src = sAppDomain + "/_Pics/StartTicker.png"; 462 marq.stop(); 463 img.alt = stopMsg; 464 marq.stopped = true; 465 eval("bTicker"+id+"Stopped=true"); 466 } 467 } 468} 469 470 471function fnPlayAudioCaptcha(key) { 472 var url = sAppDomain + "/_Captcha/audioverification.asp?key=" + key; 473 //document.getElementById("dbsAudioCaptcha" + key).innerHTML = "<embed src=\"" + url + "\" hidden=\"true\" autostart=\"true\">"; 474 document.getElementById("dbsAudioCaptcha" + key).innerHTML = '<audio autoplay><source src="' + url + '" type="audio/mpeg"></audio>'; 475} 476 477 478// ******************** From Wizard File Upload *********************** 479function fnAttachFile(nFieldCounter, nFormID) 480{ 481 if(document.getElementById('dbscategory')) 482 { 483 var sCatId=document.getElementById('dbscategory').value; 484 window.open(sAppDomain + "/_Forms/AttachFile.asp?FormID="+nFormID+"&FieldCounter="+nFieldCounter+"&CategoryID="+sCatId,"attachefile","top="+((window.screen.height-160)/2)+",left="+((window.screen.width-400)/2)+",width=400,height=120,scrollbars=no"); 485 } 486} 487 488function fnFileUploadSuccess(nFormID, nFieldCounter, sFileName) 489{ 490 var oLable = document.getElementById("wizardFileMsg"+nFormID+"_"+nFieldCounter); 491 oLable.innerText = unescape(sFileName); 492 var oInput = document.getElementById("ctlField"+nFormID+"_"+nFieldCounter); 493 oInput.value = unescape(sFileName); 494} 495 496function fnFileUploadedFailure(nFormID, nFieldCounter, key) 497{ 498 var msg = ""; 499 if (key == -1) // general 500 alert("general error"); 501 else if (key == 1) // missing data 502 alert("missing data"); 503 else if (key == 2) // no file 504 msg = "no file"; 505 else if (key == 3) // file not valid 506 msg = "file not valid or too big"; 507 if (msg != "") 508 { 509 var ctlField = document.getElementById("ctlField" + nFormID + "_" + nFieldCounter); 510 if (ctlField != null) 511 ctlField.value = ""; 512 var oLable = document.getElementById("wizardFileMsg"+nFormID+"_"+nFieldCounter); 513 if (oLable != null) 514 oLable.innerText = unescape(msg); 515 } 516 517 518} 519 520function ShowAttachFileProgress(frm) 521{ 522 frm.buttonSubmit.disabled = true; 523 frm.buttonSubmit.style.cursor = "wait"; 524 document.getElementById("butAttachFileClose").disabled = true; 525 document.getElementById("butAttachFileClose").style.cursor = "wait"; 526 frm.AttachFile.readOnly = true; 527 frm.AttachFile.style.cursor = "wait"; 528 document.body.style.cursor = "wait"; 529 return true; 530} 531 532/********************* dbsMovies *******************/ 533var intervalMovId; 534var currentMovIndex = 1; 535var currentMovImg; 536var currentMovData; 537function shiftMovImages(img, saData) 538{ 539 currentMovImg = img; 540 currentMovData = saData; 541 shuffleMov(); 542 intervalMovId = window.setInterval(shuffleMov, 800) 543} 544 545function shuffleMov() 546{ 547 if (currentMovData.length <= currentMovIndex) 548 currentMovIndex = 0; 549 currentMovImg.src = currentMovData[currentMovIndex++]; 550} 551 552function shiftMovImagesStop() 553{ 554 currentMovIndex = 1; 555 currentMovImg.src = currentMovData[0]; 556 window.clearInterval(intervalMovId); 557}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.