var deletelist = ""; var vmethod=null; var vfolderid=0; var skipcycle = false var a3approve = ""; var folderid = null; var detect = navigator.platform.toLowerCase(); var is_copy = false; var pageVal='a1'; function ConvertSpecialChars(eid) { if(document.getElementById(eid) != undefined){ textin = document.getElementById(eid).value; if(textin.length > 0){ textin = textin.replace(new RegExp(String.fromCharCode(8216),"g"),"'"); textin = textin.replace(new RegExp(String.fromCharCode(8217),"g"),"'"); textin = textin.replace(new RegExp(String.fromCharCode(8220),"g"),"\""); textin = textin.replace(new RegExp(String.fromCharCode(8221),"g"),"\""); document.getElementById(eid).value = textin; } } } function ConvertLatin2ToAsciiChars(eid) { if(document.getElementById(eid) != undefined){ textin = document.getElementById(eid).value; textin = textin.replace(/\r\n/g,"\n"); var utftext = ""; for (var n = 0; n < textin.length; n++) { var c = textin.charCodeAt(n); if (c < 128) { utftext += String.fromCharCode(c); }else if((c > 127) && (c < 2048)) { utftext += String.fromCharCode((c >> 6) | 192); utftext += String.fromCharCode((c & 63) | 128); }else if((c > 8000)) { utftext += ""; }else { utftext += String.fromCharCode((c >> 12) | 224); utftext += String.fromCharCode(((c >> 6) & 63) | 128); utftext += String.fromCharCode((c & 63) | 128); } } document.getElementById(eid).value = utftext; } } function ConvertAsciiToLatin2Chars(eid, heid) { if(document.getElementById(heid) != undefined){ utftext = document.getElementById(heid).value; var string = ""; var i = 0; var c = c1 = c2 = 0; while ( i < utftext.length ) { c = utftext.charCodeAt(i); if (c < 128) { string += String.fromCharCode(c); i++; } else if((c > 191) && (c < 224)) { c2 = utftext.charCodeAt(i+1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2; } else { c2 = utftext.charCodeAt(i+1); c3 = utftext.charCodeAt(i+2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3; } } document.getElementById(eid).innerHTML = string; } } function iswindow(){ var result = true; str = detect.substring(0,3); if (str != "win") { result = false } return result; } function trimString (str) { while (str.charAt(0) == ' ') str = str.substring(1); while (str.charAt(str.length - 1) == ' ') str = str.substring(0, str.length - 1); return str; } // Get the folder name with a popup function validRequired(formField,fieldLabel) { var result = true; if (formField.value == "" ) { disperror(ValidatorsE[33]+ " " + fieldLabel); //formField.focus(); result = false; } return result; } function validLength(formField,fieldLabel) { var result = true; if (formField.value.length<6) { disperror(ValidatorsE[5]+" "+ fieldLabel +" which is at least 6 characters in length."); formField.focus(); result = false; } return result; } function validPasswordLength(formField,fieldLabel) { var result = true; if (formField.value.length<6 || formField.value.length>25) { disperror(ValidatorsE[5]+" "+ fieldLabel +" that is 6-25 characters in length."); formField.focus(); result = false; } return result; } function validPassword(formField1,formField2){ var result = true; if (formField1.value != formField2.value){ disperror(ValidatorsE[3]); formField1.value="" ; formField2.value=""; formField1.focus(); result = false; } return result; } function validStartEndLength(formField,fieldLabel,slength,elength) { var result = true; if (formField.value.lengthelength) { disperror(ValidatorsE[19]+" "+ fieldLabel +". You can't have a channel name over " + elength +" characters long."); formField.value=""; //formField.focus(); result = false; } return result; } function validFolderEmailEntry(formField) { var result = true; var valid = ValidatorsV[2]; var ok = "yes"; var temp; for (var i=0; i= 0) { var rgbStr = currentColor.slice(currentColor.indexOf('(') + 1, currentColor.indexOf(')')); var rgbValues = rgbStr.split(","); currentColor = "#"; var hexChars = "0123456789ABCDEF"; for (var i = 0; i < 3; i++) { var v = rgbValues[i].valueOf(); currentColor += hexChars.charAt(v/16) + hexChars.charAt(v%16); } } // 4. Defines the new color // 4.1 Current color is the default one if (currentColor == '' || currentColor.toLowerCase() == theDefaultColor.toLowerCase()) { if (theAction == 'over' && thePointerColor != '') { newColor = thePointerColor; } else if (theAction == 'click' && theMarkColor != '') { newColor = theMarkColor; marked_row[theRowNum] = true; // Garvin: deactivated onclick marking of the checkbox because it's also executed // when an action (like edit/delete) on a single item is performed. Then the checkbox // would get deactived, even though we need it activated. Maybe there is a way // to detect if the row was clicked, and not an item therein./ document.getElementById('id_rows_to_delete' + theRowNum).checked = true; } } // 4.1.2 Current color is the pointer one else if (currentColor.toLowerCase() == thePointerColor.toLowerCase() && (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum])) { if (theAction == 'out') { newColor = theDefaultColor; } else if (theAction == 'click' && theMarkColor != '') { newColor = theMarkColor; marked_row[theRowNum] = true; // document.getElementById('id_rows_to_delete' + theRowNum).checked = true; } } // 4.1.3 Current color is the marker one else if (currentColor.toLowerCase() == theMarkColor.toLowerCase()) { if (theAction == 'click') { newColor = (thePointerColor != '') ? thePointerColor : theDefaultColor; marked_row[theRowNum] = (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum]) ? true : null; // document.getElementById('id_rows_to_delete' + theRowNum).checked = false; } } // end 4 // 5. Sets the new color... if (newColor) { var c = null; // 5.1 ... with DOM compatible browsers except Opera if (domDetect) { for (c = 0; c < rowCellsCnt; c++) { theCells[c].setAttribute('bgcolor', newColor, 0); } // end for } // 5.2 ... with other browsers else { for (c = 0; c < rowCellsCnt; c++) { theCells[c].style.backgroundColor = newColor; } } } // end 5 return true; } // end of the 'setPointer()' function function shareble(option,folderid){ document.location="c2aa.do?Id="+folderid; } function emailable(option,folderid){ document.location="c2c.do?option="+option+"&Id="+folderid; } /** * Checks/unchecks all tables * * @param string the form name * @param boolean whether to check or to uncheck the element * * @return boolean always true */ function setCheckboxes(the_form, do_check) { var elts = (typeof(document.forms[the_form].elements['selected_db[]']) != 'undefined') ? document.forms[the_form].elements['selected_db[]'] : (typeof(document.forms[the_form].elements['selected_tbl[]']) != 'undefined') ? document.forms[the_form].elements['selected_tbl[]'] : document.forms[the_form].elements['selected_fld[]']; var elts_cnt = (typeof(elts.length) != 'undefined') ? elts.length : 0; if (elts_cnt) { for (var i = 0; i < elts_cnt; i++) { elts[i].checked = do_check; } // end for } else { elts.checked = do_check; } // end if... else } // end of the 'setCheckboxes()' function function setSharingToOff(folderid) { document.location="setSharingToOff.do?Id="+folderid; } function savea3(){ if (document.test.scp.value.length < 250){ ConvertSpecialChars("scp"); ConvertSpecialChars("stp"); ConvertSpecialChars("sdp"); document.test.action = "savea3.do"; document.test.method = "post"; document.test.submit(); } else{ alert("Captions must be less than 250 characters."); } } function cancela3(){ document.test.action = "folder.do"; document.test.method = "post"; document.test.submit(); } function cancela3a1b(){ document.test.action = "getStatus.do"; document.test.method = "post"; document.test.submit(); } function cancela2(){ document.test.action = "getStatus.do"; document.test.method = "post"; document.test.submit(); } function donea2(id){ document.location="folder.do?Id="+id; } function cancela3Approval(){ document.cancela3Approval.action = "tobeapproved.do?a=a"; document.cancela3Approval.method = "get"; document.cancela3Approval.submit(); } function addcomment(){ check_lengthA3(); //check comment length first trim if >5K if(comment_limit_flag_on_A3 =="true")// save only if comments are under limit { ConvertSpecialChars("csp"); document.test.action = "addcommenta3.do"; document.test.method = "post"; document.test.submit(); } } function deletecomment(){ document.test.action = "deletecommenta3.do"; document.test.method = "get"; document.test.submit(); } var comment_limit_flag_on_A3 = "true"; // true = under limit, false = exceeds limit function check_lengthA3() { //alert(formName+fieldId+counterId); maxLen = 5000; // max number of characters allowed if (document.test.csp.value.length > maxLen) { // Alert message if maximum limit is reached. If required alert can be commented. comment_limit_flag_on_A3 = "false"; var msg = "Please limit text to 5000 characters."; alert(msg); document.test.csp.value = document.test.csp.value.substring(0, maxLen);// Reached the Maximum length so trim the textarea } else{ comment_limit_flag_on_A3 = "true"; //document.test.counter.value = maxLen - document.test.csp.value.length;// Maximum length not reached so update the value of fieldId counter } } function GetSetPrint(folderid,imageTypes) { sis = ""; var a = ""; var videoFound = false; var checklist = document.forms['test'].elements['selected_tbl[]']; var count = (typeof(checklist.length) != 'undefined') ? checklist.length : 0; if(count) { for (var i = 0; i < count; i++) { a = a + checklist[i].value + ","; if ( checklist[i].checked && imageTypes[i]!='movie') sis = sis + checklist[i].value + ","; if ( imageTypes[i]=='movie' && checklist[i].checked ) videoFound = true; } } else { count = checklist.value; if(checklist.checked==true) { sis = count; a = count; } } if (sis != "" && videoFound==true) { if (!confirm('You selected photos and videos. Would you like to print the photos?')) return; } if (sis != "") { document.location='p1.do?folderid='+folderid+'&sis='+sis+'&cpp='+escape('folder.do?Id='+folderid); } else { alert('Please select at least one photo to print.'); } } function GetSetRotate(folderid,direction,cpp,pn,layerName) { deletelist = ""; var a = ""; var hotspotflag = "0"; var checklist = document.forms['test'].elements['selected_tbl[]']; var count = (typeof(checklist.length) != 'undefined') ? checklist.length : 0; if(count) { for (var i = 0; i < count; i++){ a = a + checklist[i].value + ","; if ( checklist[i].checked){ deletelist = deletelist + checklist[i].value + ","; hotspotflag = checklist[i].title.substring(8,200); if(hotspotflag == "1"){ break; } } } } else { count = checklist.value; hotspotflag = checklist.title; if(checklist.checked==true) { deletelist = count; a = count; } } if (deletelist != "" && hotspotflag == "0") { document.test.action = "x5a.do?rdp="+direction+"&sis="+a+"&rsis="+deletelist+"&Id="+folderid+"&cpp="+cpp+"&pn="+pn; document.test.method = "post"; document.test.submit(); } else if(deletelist != "" && hotspotflag == "1"){ alert(ValidatorsM[25]); } else { alert(ValidatorsM[5]); } } function GetSetRotatea3(folderid,direction,cpp,pn,layerName) { document.location = "x5a.do?rdp="+direction+"&rsis="+document.test.sis.value+"&Id="+folderid+"&cpp="+cpp+"&pn="+pn; } function GetSetRotatea3Approval(folderid,direction,cpp,pn,layerName) { document.location = "x5a.do?rdp="+direction+"&rsis="+document.test.sis.value+"&Id="+folderid+"&cpp="+cpp+"&pn="+pn+"&view=approval"; } function hidediv() { if (document.getElementById) { // DOM3 = IE5, NS6 document.getElementById('hideshow').style.visibility = 'hidden'; } else { if (document.layers) { // Netscape 4 document.hideshow.visibility = 'hidden'; } else { // IE 4 document.all.hideshow.style.visibility = 'hidden'; } } } function showdiv() { if (document.getElementById) { // DOM3 = IE5, NS6 document.getElementById('hideshow').style.visibility = 'visible'; } else { if (document.layers) { // Netscape 4 document.hideshow.visibility = 'visible'; } else { // IE 4 document.all.hideshow.style.visibility = 'visible'; } } } function DeleteSelected1() { var i; var theTable, table var Form=document.forms[0]; //var table=document.getElementById('myTable'); theTable= (document.all) ? document.all.myTable : document.getElementById("myTable") //theTableBody = table.tBodies[0] var a=document.getElementById('myTable').rows; var my = document.getElementsByName("folderId[]"); var count = (typeof(my.length) != 'undefined') ? my.length : 0; for(i=theTable.rows.length-2;i>=0;i--) { var b=a[i].cells var test = b[0].innerHTML; //alert(my[m].checked); if(my[i].checked) { if (document.getElementById("ok"+my[i].value)){ document.getElementById("ok"+my[i].value).disabled = false; } theTable.deleteRow(i); } } } function DeleteSelected() { var i; var theTable, table var Form=document.forms[0]; //var table=document.getElementById('myTable'); theTable= (document.all) ? document.all.myTable : document.getElementById("myTable") //theTableBody = table.tBodies[0] var a=document.getElementById('myTable').rows; var my = document.getElementsByName("email[]"); var count = (typeof(my.length) != 'undefined') ? my.length : 0; for(i=theTable.rows.length-2;i>=0;i--) { var b=a[i].cells var test = b[0].innerHTML; //alert(my[m].checked); if(my[i].checked) { theTable.deleteRow(i); } } } function CheckDeleteSelected(){ var i; var j=0; clearerror(); var theTable, table var Form=document.forms[0]; //var table=document.getElementById('myTable'); theTable= (document.all) ? document.all.myTable : document.getElementById("myTable") //theTableBody = table.tBodies[0] var a=document.getElementById('myTable').rows; var my = document.getElementsByName("folderId[]"); var count = (typeof(my.length) != 'undefined') ? my.length : 0; for(i=theTable.rows.length-2;i>=0;i--) { var b=a[i].cells var test = b[0].innerHTML; //alert(my[i].checked); if(my[i].checked) { j++; } } if (j < 1 ){ if(theTable.rows.length > 1) alert("Select a Channel to remove"); else alert("Select a channel to remove"); } else { removefolder(); } } function removefolder() { var name=confirm("Are you sure you want to remove?") if (name) { DeleteSelected1(); } } function deleteFolderc2c() { var name=confirm("Are you sure you want to remove that channel?") if (name) { DeleteSelected(); } } function AddEmail() { var textarea=document.getElementById('name').value; if(textarea=="") { disperror(ValidatorsE[2]); return; } var EmailList=GetEmail(textarea); for(var count=0;count"; row.insertCell(1).innerHTML=value; } } else { disperror(value+" "+ValidatorsM[6]); } } function AddToTable1(value,value1,value2) { //alert(value +" , "+ value1+" , "+value2); var table=document.getElementById('myTable'); if(IsNotPresent1(value1)) { var row=table.insertRow(0); row.height="22px"; row.insertCell(0).innerHTML=""; row.insertCell(1).innerHTML=""; row.insertCell(2).innerHTML=value1; } else { disperror(value1+" has already been added."); } } function AddToTableOnLoad(value) { var table=document.getElementById('myTable'); var row=table.insertRow(0); row.height="22px"; row.insertCell(0).innerHTML=""; row.insertCell(1).innerHTML=value; } function GetEmail(EmailList) { var email=new Array(); var j=0; email[j]=""; for(var count=0;count"; } function folderselected(folid){ folderid = folid; } function displayOn(menuID) { try { if (document.getElementById) { document.getElementById(menuID).style.display = 'block'; } else if (document.layers && document.layers[menuID]) { document.layers[menuID].display = 'block'; } else if (document.all) { document.all[menuID].style.display = 'block'; } }catch(e){} } function displayOff(menuID) { try { if (document.getElementById) { document.getElementById(menuID).style.display = 'none'; } else if (document.layers && document.layers[menuID]) { document.layers[menuID].display = 'none'; } else if (document.all) { document.all[menuID].style.display = 'none'; } }catch(e){} } function layerOn(menuID) { if (document.getElementById) { document.getElementById(menuID).style.visibility = 'visible'; } else if (document.layers && document.layers[menuID]) { document.layers[menuID].visibility = 'visible'; } else if (document.all) { document.all[menuID].style.visibility = 'visible'; } } var user_id; function layerOnAlt(menuID,extra_id,obj) { user_id = extra_id; if (document.getElementById) { document.getElementById(menuID).style.visibility = 'visible'; document.getElementById(menuID).style.top = findPosY(obj)+20; document.getElementById(menuID).style.left = findPosX(obj); } else if (document.layers && document.layers[menuID]) { document.layers[menuID].visibility = 'visible'; document.layers[menuID].top = findPosY(obj)+20; document.layers[menuID].left = findPosX(obj); } else if (document.all) { document.all[menuID].style.visibility = 'visible'; document.all[menuID].style.top = findPosY(obj)+20; document.all[menuID].style.left = findPosX(obj); } } function findPosX(obj) { var curleft = 0; if (obj.offsetParent) { while (obj.offsetParent) { curleft += obj.offsetLeft obj = obj.offsetParent; } } else if (obj.x) curleft += obj.x; return curleft; } function findPosY(obj) { var curtop = 0; if (obj.offsetParent) { while (obj.offsetParent) { curtop += obj.offsetTop obj = obj.offsetParent; } } else if (obj.y) curtop += obj.y; return curtop; } function getuser_id() { return user_id; } function get_Element(eleid) { if (document.getElementById) return document.getElementById(eleid); else if (document.all) return document.all[eleid]; } function layerOff(menuID) { try { if (document.getElementById) { document.getElementById(menuID).style.visibility = 'hidden'; } else if (document.layers && document.layers[menuID]) { document.layers[menuID].visibility = 'hidden'; } else if (document.all) { document.all[menuID].style.visibility = 'hidden'; } } catch(e){} } function testt(menuID){ document.getElementById(menuID).onMouseOut = function(){ disperror(menuID); layerOff(menuID); } } function placeBackground(layerName, event) { document.getElementById(layerName).style.top = mouseY(event); document.getElementById(layerName).style.left = mouseX(event); } function mouseX(evt) { if (evt.pageX) return ( evt.pageX - 175 ); else if (evt.clientX) return ( ( evt.clientX - 175 ) + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) ); else return null; } function mouseY(evt) { if (evt.pageY) return ( evt.pageY - 35 ); else if (evt.clientY) return ( ( evt.clientY - 35 ) + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) ); else return null; } function c1abuploadsubmit(folderid,pn) { attachlist = ""; var checklist = document.forms['test'].elements['selected_tbl[]']; var count = (typeof(checklist.length) != 'undefined') ? checklist.length : 0; if(count) { for (var i = 0; i < count; i++){ if ( checklist[i].checked) attachlist = attachlist + checklist[i].value + ","; } } else { count = checklist.value; if(checklist.checked==true) { attachlist = count; } } if (attachlist != "") { if(pn == 0) { document.location="attachsettoupload.do?sis="+attachlist+"&Id="+folderid; } else { document.location="attachsettoupload.do?sis="+attachlist+"&Id="+folderid+"&pn="+pn; } } else { disperror(ValidatorsM[7]); } } function c1absubmit(folderid,pn) { c1absubmititems(folderid,pn,'attachsettomail.do?p=y'); } function c1absubmititems(folderid,pn,url) { attachlist = ""; var checklist = document.forms['test'].elements['selected_tbl[]']; var count = (typeof(checklist.length) != 'undefined') ? checklist.length : 0; if(count) { for (var i = 0; i < count; i++){ if ( checklist[i].checked) attachlist = attachlist + checklist[i].value + ","; } } else { count = checklist.value; if(checklist.checked==true) { attachlist = count; } } if (attachlist != "") { if(pn == 0) { document.location=url+"&sis="+attachlist+"&Id="+folderid; } else { document.location=url+"&sis="+attachlist+"&Id="+folderid+"&pn="+pn; } } else { disperror(ValidatorsM[7]); } } function c1abinvsub(folderid,pn) { attachlist = ""; var checklist = document.forms['test'].elements['selected_tbl[]']; var count = (typeof(checklist.length) != 'undefined') ? checklist.length : 0; if(count) { for (var i = 0; i < count; i++){ if ( checklist[i].checked) attachlist = attachlist + checklist[i].value + ","; } } else { count = checklist.value; if(checklist.checked==true) { attachlist = count; } } if (attachlist != "") { if(pn == 0) { document.location="c1abinviteattachsettomail.do?sis="+attachlist+"&Id="+folderid; } else { document.location="c1abinviteattachsettomail.do?sis="+attachlist+"&Id="+folderid+"&pn="+pn; } } else { disperror(ValidatorsM[7]); } } function c1adsubmit(folderId) { c1adsubmititems(folderId,"removeattachmentsc1a.do?p=y"); } function c1adsubmititems(folderId,url) { /* t = document.forms[0].length; for(i=0; i 0) { document.test1.action = url+"&Id="+folderId; document.test1.submit(); } else { disperror(ValidatorsM[19]); } } function c1adsubmitinv(folderId) { /* t = document.forms[0].length; for(i=0; i 0) { document.test1.action = "removeattachmentsinvite.do?Id="+folderId; document.test1.submit(); } else { disperror(ValidatorsM[19]); } } function c1absubmit1(folderid){ document.location="c1a.do?Id="+folderid; } function c1abuploadsubmit1(url){ window.opener.location=url; self.close(); } function c1abinvite1(folderid){ document.location="c1a_invite.do?Id="+folderid; } function c1aa2submit(folderid, type) { attachlist = ""; var checklist = document.forms['test'].elements['selected_tbl[]']; var count = (typeof(checklist.length) != 'undefined') ? checklist.length : 0; if(count) { for (var i = 0; i < count; i++){ if ( checklist[i].checked) attachlist = attachlist + checklist[i].value + ","; } } else { count = checklist.value; if(checklist.checked==true) { attachlist = count; } } if (attachlist != "") { document.location="aa2.do?sis="+attachlist+"&Id="+folderid+"&cliptype="+type; } else { disperror(ValidatorsM[24]); } } function c1a1submit(folderid) { attachlist = ""; var checklist = document.forms['test'].elements['selected_tbl[]']; var count = (typeof(checklist.length) != 'undefined') ? checklist.length : 0; if(count) { for (var i = 0; i < count; i++){ if ( checklist[i].checked){ attachlist = attachlist + checklist[i].value + ","; } } } else { //alert("Please choose a clip before saving"); count = checklist.value; if(checklist.checked==true) { attachlist = count; } } if (attachlist != "") { document.location="savefeaturephoto.do?sis="+attachlist+"&Id="+folderid; } else { alert("Please choose a clip before saving"); disperror(ValidatorsM[7]); } } function c1aesubmit(folderid) { attachlist = ""; var checklist = document.forms['test'].elements['selected_tbl[]']; var count = (typeof(checklist.length) != 'undefined') ? checklist.length : 0; if(count) { for (var i = 0; i < count; i++){ if ( checklist[i].checked) attachlist = attachlist + checklist[i].value + ","; } } else { count = checklist.value; if(checklist.checked==true) { attachlist = count; } } if (attachlist != "") { document.location="loadc1avideogram.do?sis="+attachlist+"&Id="+folderid; } else { disperror(ValidatorsM[7]); } } function c1abinvitesubmit(folderid) { attachlist = ""; var checklist = document.forms['test'].elements['selected_tbl[]']; var count = (typeof(checklist.length) != 'undefined') ? checklist.length : 0; if(count) { for (var i = 0; i < count; i++){ if ( checklist[i].checked) attachlist = attachlist + checklist[i].value + ","; } } else { count = checklist.value; if(checklist.checked==true) { attachlist = count; } } if (attachlist != "") { document.location="c1abinviteattachsettomail.do?sis="+attachlist+"&Id="+folderid; } else { disperror(ValidatorsM[7]); } } var FlashDetector_Playable = false; var FlashDetector_TargetVersion = 6; if(typeof FlashDetector_TargetVersion == 'undefined') { var FlashDetector_TargetVersion = '7'; } var FlashDetector_Playable = false; var FlashDetector_Version = 0; var FlashDetector_IsIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false; var FlashDetector_IsWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false; if(FlashDetector_IsIE && FlashDetector_IsWin) { document.write(' \n'); document.write('on error resume next \n'); document.write('FlashDetector_Playable = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & FlashDetector_TargetVersion)))\n'); document.write(' \n'); } else { FlashDetector_Playable = FlashDetector_Detect(); } function FlashDetector_Detect() { var pObj = null; var tokens, len, curr_tok; var hasVersion = -1; var playable = false; if(navigator.mimeTypes && navigator.mimeTypes['application/x-shockwave-flash']) { pObj = navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin; } if(pObj != null) { tokens = navigator.plugins['Shockwave Flash'].description.split(' '); len = tokens.length; while(len--) { curr_tok = tokens[len]; if(!isNaN(parseInt(curr_tok))) { hasVersion = curr_tok; FlashDetector_Version = curr_tok; break; } } if(hasVersion >= FlashDetector_TargetVersion) { playable = true; } else { playable = false; } } return playable; } function plib_Browser() { d=document; this.agt=navigator.userAgent.toLowerCase(); this.major = parseInt(navigator.appVersion); this.dom=(d.getElementById)?1:0; this.ns=(d.layers); this.ns4up=(this.ns && this.major >=4); this.ns6=(this.dom&&navigator.appName=="Netscape"); this.op=(window.opera? 1:0); this.ie=(d.all); this.ie4=(d.all&&!this.dom)?1:0; this.ie4up=(this.ie && this.major >= 4); this.ie5=(d.all&&this.dom); this.win=((this.agt.indexOf("win")!=-1) || (this.agt.indexOf("16bit")!=-1)); this.mac=(this.agt.indexOf("mac")!=-1); }; var oBw = new plib_Browser(); function DisplayElement ( elt, displayValue ) { if ( typeof elt == "string" ) elt = document.getElementById( elt ); if ( elt == null ) return; if ( oBw && oBw.ns6 ) { // OTW table formatting will be lost: if ( displayValue == "block" && elt.tagName == "TR" ) displayValue = "table-row"; else if ( displayValue == "inline" && elt.tagName == "TR" ) displayValue = "table-cell"; else if ( displayValue == "none" && elt.tagName == "TD" ) displayValue = "none"; } elt.style.display = displayValue; } function AddCC ( doFocus ) { DisplayElement ( "ccrow", "" ); DisplayElement ( "cclink", "none" ); DisplayElement ( "cclink1", "inline" ); if ( doFocus ) { var field = window.document.getElementById( "geccp" ); if ( field != null ) field.focus(); } } function RemoveCC (formname) { doc = eval("document."+formname+".gecp"); if ( doc.value != "" ) if ( !confirm ( "Remove all CC addresses you've entered?" ) ) return; doc.value = ""; DisplayElement ( "ccrow", "none" ); DisplayElement ( "cclink1", "none" ); DisplayElement ( "cclink", "inline" ); foc = eval("document."+formname+".getp"); foc.focus(); } function AddBCC ( doFocus ) { DisplayElement ( "bccrow", "" ); DisplayElement ( "bcclink", "none" ); DisplayElement ( "bcclink1", "inline" ); if ( doFocus ) { var field = window.document.getElementById( "gebccp" ); if ( field != null ) field.focus(); } } function RemoveBCC (formname) { doc = eval("document."+formname+".gebp"); if ( doc.value != "" ) if ( !confirm ( "Remove all BCC addresses you've entered?" ) ) return; doc.value = ""; DisplayElement ( "bccrow", "none" ); DisplayElement ( "bcclink1", "none" ); DisplayElement ( "bcclink", "inline" ); foc = eval("document."+formname+".getp"); foc.focus(); } function Addsandi () { DisplayElement ( "sandi", "inline" ); DisplayElement ( "sandi2", "inline" ); } function Removesandi () { DisplayElement ( "sandi", "none" ); DisplayElement ( "sandi2", "none" ); } function Removeformsub () { DisplayElement ( "subform", "none" ); } function checkEnter2(e,folderId,imageMod){ //e is event object passed from function invocation var characterCode //literal character code will be stored in this variable if(e && e.which){ //if which property of event object is supported (NN4) e = e characterCode = e.which //character code is contained in NN4's which property } else{ e = event characterCode = e.keyCode //character code is contained in IE's keyCode property } if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key) submitNewFolderAdd(folderId,imageMod); return false ; } else{ return true ; } } function disperronpage(){ disperror(ValidatorsM[11]); } function profile_erronpage(){ disperror(ValidatorsM[22]); } function attachmentalert(){ disperror(ValidatorsM[10]); } function GetFolderDeleteAlbum(){ deletelist = ""; widgetyes = "no"; approveyes = "no"; var checklist = document.forms['test'].elements['selected_tbl[]']; var count = (typeof(checklist.length) != 'undefined') ? checklist.length : 0; if(count) { for (var i = 0; i < count; i++){ if ( checklist[i].checked){ deletelist = deletelist + checklist[i].value + ","; islinkedtowidget = document.getElementById(checklist[i].value+'_w').value; if (islinkedtowidget == "true") { widgetyes = "yes"; } isitemsapprove = document.getElementById(checklist[i].value+'_a').value; if (isitemsapprove == "true") { approveyes = "yes"; } } } } else { count = checklist.value; if(checklist.checked==true) { deletelist = count; islinkedtowidget = document.getElementById(count+'_w').value; if (islinkedtowidget == "true") { widgetyes = "yes"; } isitemsapprove = document.getElementById(count+'_a').value; if (isitemsapprove == "true") { approveyes = "yes"; } } } if (deletelist != "") { if(widgetyes == "yes" && approveyes == "yes") { var name=confirm(ValidatorsE[37]); } else if (widgetyes == "yes"){ var name=confirm(ValidatorsE[36]); } else if(approveyes == "yes"){ var name=confirm(ValidatorsE[21]); } else { var name=confirm(ValidatorsE[15]); } if (name) { document.location="DeleteFolderAlbum.do?Id="+deletelist+"&page=a1_album&delete=true"; } } else { alert(ValidatorsM[4]+" "+method+"."); } } function getFolderNameRenameAlbum(){ deletelist = ""; var count1 = 0; var checklist = document.forms['test'].elements['selected_tbl[]']; var count = (typeof(checklist.length) != 'undefined') ? checklist.length : 0; if(count) { for (var i = 0; i < count; i++){ if ( checklist[i].checked) { count1++; deletelist = deletelist + checklist[i].value; } } } else { count = checklist.value; if(checklist.checked==true) { count1++; deletelist = count; } } if (count1 == 1 && deletelist != "") { folderid = deletelist; layerOn('rename_background'); layerOn('rename_menu'); } else { if (count1 > 1){ alert("Select only one channel at a time for renaming."); } else{ alert("You must select a channel for renaming."); } } } function submitFolderRenameAlbum() { if(validRequired(folderrename.folderrename,"Channel.") && validFolderEntry(folderrename.folderrename) && validStartEndLength(folderrename.folderrename,"title",1,60)) { var folderrename1 = null; folderrename1 = document.folderrename.folderrename.value; document.location="RenameFolderAlbum.do?FolderName="+escape(folderrename1)+"&Id="+folderid; layerOff('rename_menu'); layerOff('rename_background'); } else { layerOff('rename_menu'); layerOff('rename_background'); } } function docsubmit(startIndex,endIndex){ k = 0; for (i=startIndex; i <= endIndex; i++){ if (document.getElementById("SetSelected_"+i).checked){ k++; } } if (k > 0){ var name=confirm(ValidatorsE[18]) if (name) { document.si1.submit(); } } else { alert(ValidatorsM[23]); } } function disableIt(obj) { obj.disabled = !(obj.disabled); //var z = (obj.disabled) ? 'disabled' : ''; //alert(obj.type + ' now ' + z); } function closeWind(){ self.close (); } function canmoveit(elementname, elementnumber) { /*var createaccount = document.getElementById('createaccountdiv'); createaccount.innerHTML = ""; */ document.getElementById(elementname+elementnumber).innerHTML = "\"Processing\""; }