function navHover(state, direction) { switch(direction) { case 'd0': object = 'Probes'; break; case 'd1': object = 'Graphs'; break; case 'd2': object = 'Reports'; break; case 'd3': object = 'Settings'; break; case 'd4': object = 'AddUser'; break; default: object = 'Probes'; } if(state == 0) { document.images[direction].src = "images/button" + object + "Text.png"; } else { document.images[direction].src = "images/button" + object + ".png"; } } function dstDates() { if(document.getElementById("DST").checked == true) { document.getElementById("dstDates").style.display = "block"; } else { document.getElementById("dstDates").style.display = "none"; } } function printpage(divtoprint, title) { /* var DocumentContainer = document.getElementById(divtoprint); var WindowObject = window.open("", "PrintWindow","width=800,height=650,top=50,left=50,toolbars=no,scrollbars=yes,status=no,resizable=yes"); WindowObject.document.writeln("" + title + ""); WindowObject.document.writeln(DocumentContainer.innerHTML); WindowObject.document.writeln(""); WindowObject.document.close(); WindowObject.focus(); WindowObject.print(); WindowObject.close(); */ window.print(); } function popup(mylink, windowname) { if (! window.focus)return true; var href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.href; window.open(href, windowname, 'width=640,height=230,scrollbars=no'); return false; } function preferencesSubmit() { var valid = true; var a = new Array(); a = document.getElementsByName("daily[]"); b = document.getElementsByName("weekly[]"); c = document.getElementsByName("monthly[]"); var p = 0; for(i = 0; i < a.length; i++) { if(a[i].checked == true) { p++; } } for(i = 0; i < b.length; i++) { if(a[i].checked == true) { p++; } } for(i = 0; i < c.length; i++) { if(a[i].checked == true) { p++; } } if(document.userInfo.email.value == "" && p > 0) { alert ( "You must enter an email address to receive Reports." ); valid = false; } else if(document.userInfo.notify['email'].checked == true && document.userInfo.email.value == "") { alert ( "You must enter an email address to receive emailed Notifications." ); valid = false; } else if(document.userInfo.notify['text'].checked == true && (document.userInfo.mobile.value == "" || document.userInfo.providerID.value == 0)) { alert ( "You must enter a phone number and choose a provider to receive text Notifications." ); valid = false; } else if(document.userInfo.notify['voice'].checked == true && document.userInfo.mobile.value == "") { alert ( "You must enter a phone number to receive voice Notifications." ); valid = false; } return valid; } function buttons(destination, value) { if(destination == 'delete') { window.location = '/members/tm/configuration.php?action=4&user=' + value; } else if(destination == 'status') { href = '/members/tm/statusreport.html?S=' + value; windowname = 'StatusReport'; window.open(href, windowname, 'width=850,height=600,scrollbars=yes'); } else if(destination == 'reset') { window.location = '/members/tm/configuration.php?action=6&user=' + value; } else if(destination == 'cs') { window.location = '/members/tm/csindex.html'; } else if(destination == 'addProduct') { window.location = '/members/tm/addproduct.html'; } else if(destination == 'delProd') { window.location = '/members/tm/fmconfig.php?action=2&pI=' + value; } else if(destination == 'delUser') { window.location = '/members/tm/ccpconfig.php?up=3&uI=' + value; } else if(destination == 'ccpdashboard') { window.location = '/members/tm/zccpdashboard.html'; } else if(destination == 'ccpprobes') { window.location = '/members/tm/probes.html'; } else if(destination == 'delItem') { /* * items that are deleted, are only deleted on the delta table, * and those deletions do not take effect until the entire schedule * is updated. */ window.location = '/members/tm/ccpconfig.php?up=5&ccpID=' + value; } } var ie = (function(){ var undef, v = 3, div = document.createElement('div'), all = div.getElementsByTagName('i'); while ( div.innerHTML = '', all[0] ); return v > 4 ? v : undef; }());