function updateping(){ $.ajax({ url : "common/updint.php", cache: false, success : function (data) { $("#pingreq").html(data); } }); } function settree(d_tree,istree){ $("#home").addClass("closed"); $("#cm").addClass("closed"); $("#pl").addClass("closed"); $("#em").addClass("closed"); $("#"+d_tree).addClass("open"); if(istree!=''){ $("#"+istree).addClass("fileopen"); $("#"+istree+"_link").css({color:"#666666", fontWeight:"bolder", "text-decoration" : "underline" }); } } function tooltip(){ xOffset = 10; yOffset = 20; $("a.tooltip").hover(function(e){ this.t = this.title; this.title = ""; $("body").append("
"+ this.t +"
"); $("#tooltip") .css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px") .fadeIn("fast"); }, function(){ this.title = this.t; $("#tooltip").remove(); }); $("a.tooltip").mousemove(function(e){ $("#tooltip") .css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px"); }); }; function prompt_msg_text(frmname,action,row){ var myval = "Note: "+$("#ctl"+row).text()+"\n"; var txt = '
Remarks:
'+ ''+ '

 

'; $.prompt(txt,{ buttons:{Ok:true, Cancel:false}, show:'slideDown', prefix:'colsJqi', focus:1, submit: function(v,m){ var f = m.find('#editfname').val(); var flag = true; if($.trim(f) == '' && v){ m.find('#editfname').addClass('error'); flag = false; } else m.find('#editfname').removeClass('error'); return flag; }, callback: function(v,m){ var f = m.find('#editfname').val(); if(v){ $("#selid").val(row); $("#oComments").val(f); $("#pageaction").val(action); $("#"+frmname).submit(); } else{} } }); } function ShowMSG(txt){ $.prompt(txt,{opacity: 0.6, show:'slideDown', prefix:'cleanblue'}); } function ShowForms(txt,prefx){ $.prompt(txt,{opacity: 0.6, show:'slideDown', prefix: prefx, tops:'50px'}); } function prompt_msg_jqi(txt,action,frmname){ $.prompt(txt,{ buttons:{Ok:true, Cancel:false}, show:'slideDown', prefix:'f_cleanblue', focus:1, submit: function(v,m){ return true; }, callback: function(v,m){ if(v){ $("#pageaction").val(action); $("#"+frmname).submit(); } else{} } }); } function selectAll(){ incount = document.getElementsByName('delete_id[]').length+1; if(document.getElementById("checkAll").checked==true){ document.getElementById("checkAll").checked=true; for (i=1;i\n" + "" + caption + "\\n" + "\n\n" + "\n" + "\""\n" + "\n" + "\n"; var imageWindow = window.open ("","imageWin",Options); imageWindow.document.write (myScript) imageWindow.document.close (); if (window.focus) imageWindow.focus(); return false; } var bikky = document.cookie; function getCookie(name) { var index = bikky.indexOf(name + "="); if (index == -1) return null; index = bikky.indexOf("=", index) + 1; var endstr = bikky.indexOf(";", index); if (endstr == -1) endstr = bikky.length; return unescape(bikky.substring(index, endstr)); } function setCookie(name, value) { if (value != null && value != "") document.cookie=name + "=" + escape(value) + ";"; bikky= document.cookie; } var bikkys = document.cookie; function getexpirydate(nodays){ var UTCstring; Today = new Date(); nomilli=Date.parse(Today); Today.setTime(nomilli+nodays*24*60*60*1000); UTCstring = Today.toUTCString(); return UTCstring; } function getcookietime(cookiename) { var cookiestring=""+document.cookie; var index1=cookiestring.indexOf(cookiename); if (index1==-1 || cookiename=="") return ""; var index2=cookiestring.indexOf(';',index1); if (index2==-1) index2=cookiestring.length; return unescape(cookiestring.substring(index1+cookiename.length+1,index2)); } function setcookietime(name,value,duration){ cookiestring=name+"="+escape(value)+";EXPIRES="+getexpirydate(duration); document.cookie=cookiestring; bikkys= document.cookie; if(!getcookietime(name)){ return false; } else { return true; } } function getPositionX(element){ var x=0; while(element!=null){ x += element.offsetLeft-element.scrollLeft; element=element.offsetParent; } return x; } function getPositionY(element){ var y=0; while(element!=null){ y += element.offsetTop-element.scrollTop; element=element.offsetParent; } return y; } function MM_goToURL() { //v3.0 var i, args=MM_goToURL.arguments; document.MM_returnValue = false; for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'"); } function showHide(obj) { if(document.getElementById(obj+'Parent').className == 'active') { document.getElementById(obj+'Parent').className = ""; document.getElementById(obj).className = "hideMe"; } else { document.getElementById(obj+'Parent').className = "active"; document.getElementById(obj).className = "showMe"; } } function trim(strText) { // this will get rid of leading spaces while (strText.substring(0,1) == ' ') strText = strText.substring(1, strText.length); // this will get rid of trailing spaces while (strText.substring(strText.length-1,strText.length) == ' ') strText = strText.substring(0, strText.length-1); return strText; } function trimTextArea(strText) { //replace enter key and trim the text and check for empty value strDesc=strText.replace(/\r\n|\r|\n/g, ' '); return strDesc; } function PopupCenter(pageURL, title,w,h) { var left = (screen.width/2)-(w/2); var top = (screen.height/2)-(h/2); var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left); targetWin.focus(); } function printWindow(){ browserVersion = parseInt(navigator.appVersion) if (browserVersion >= 4) window.print() } function gup( name ){ name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS = "[\\?&]"+name+"=([^&#]*)"; var regex = new RegExp(regexS); var results = regex.exec( window.location.href); if( results == null ) return ""; else return results[1]; } var counter = 0; var formblock; var forminputs; var msg_txt = ""; function fn_check_last_tag(tag){ if(tag.previousSibling.id == 'header') return true; if ((!tag.previousSibling || tag.previousSibling.id == 'header' || typeof(tag.previousSibling.id) == 'undefined') && (!tag.nextSibling || typeof(tag.nextSibling.id) == 'undefined')) return true; return false; } function fn_remove_tag(tag_id){ if(document.getElementById) { src = document.getElementById("box_new_"+tag_id); if (!fn_check_last_tag(src)) src.parentNode.removeChild(src); } } function fn_remove_tag1(tag_id){ if(document.getElementById) { src = document.getElementById("box_"+tag_id); if (!fn_check_last_tag(src)) src.parentNode.removeChild(src); } } function fn_str_get_front(mainStr,searchStr){ foundOffset = mainStr.indexOf(searchStr) if (foundOffset == -1) { return null } return mainStr.substring(0,foundOffset); } function fn_str_get_end(mainStr,searchStr){ foundOffset = mainStr.indexOf(searchStr) if (foundOffset == -1) { return null } return mainStr.substring(foundOffset+searchStr.length,mainStr.length); } // replace searchString with replaceString function fn_str_replace_string(mainStr,searchStr,replaceStr){ var front = fn_str_get_front(mainStr,searchStr); var end = fn_str_get_end(mainStr,searchStr); if (front != null && end != null) { return front + replaceStr + end; } return ''; } function fn_replace(substring, level){ var re = new RegExp(); var i = 0; re.compile("\\[\\d+\\]", "g"); for (i=1; i<=level; i++) { re.exec(substring); } substring = RegExp.leftContext+'['+counter+']'+RegExp.rightContext; return substring; } function fn_add_tag(tag_id, level, clone) { var j = 0; var i = 0; var re_names = new RegExp(); var re_ids = new RegExp(); if(document.getElementById) { counter++; new_id = tag_id+"_"+counter; src = document.getElementById("box_"+tag_id); var newNode = src.cloneNode(true); newNode.id = "box_"+new_id; re_names.compile("name=(\\\"|\\\')*\\w*(\\[\\w*\\])+(\\\"|\\\')*", "gi"); var arr_names = newNode.innerHTML.match(re_names); node_elms = newNode.getElementsByTagName('*'); for (i=0;i0) { if (node_elms[i].type!='text'){ node_elms[i].id = node_elms[i].id + '_'+counter; } else { var xt = node_elms[i].id; node_elms[i].id = xt.substring(0,6)+'['+counter+']'; } } if (node_elms[i].nodeName=='TD') { if (node_elms[i].style.display == 'none' && clone != 'Y') { node_elms[i].style.display = ''; } // Replace [%d] in nodes names for (j=0; j0) { node_elms[i].innerHTML = str; } } } } } // Insert node into the document newNode = src.parentNode.insertBefore(newNode,src.nextSibling); // Process INPUT types... child_inputs = newNode.getElementsByTagName('INPUT'); parent_inputs = src.getElementsByTagName('INPUT'); for (i=0;i0) { document.getElementById('bulk_'+tag_id).style.display=hide; document.getElementById('nameen_'+tag_id).style.display=hide; document.getElementById('position_'+tag_id).style.display=hide; document.getElementById('hbulk_'+tag_id).style.display=hide; document.getElementById('hnameen_'+tag_id).style.display=hide; document.getElementById('hposition_'+tag_id).style.display=hide; for (i=1;i