function get_height(id){ var parent = document.getElementById(id); var height = document.defaultView.getComputedStyle(id,null).getPropertyValue("height"); return height; } function size_vert_grad(source,target){ height = get_height(source); document.getElementById(target).src = 'magicpic.php?a=show&width=30&src=dk_vertgrad.png&height='+height; } function redirect(page){ window.location = page; } function show_hide_section(number){ if (document.getElementById('left_nav_links_'+number).style.display == 'none'){ document.getElementById('left_nav_links_'+number).style.display = 'block'; document.getElementById('left_nav_section_img_'+number).src= 'http://images.designknights.com/minusbox.png'; } else { document.getElementById('left_nav_links_'+number).style.display = 'none'; document.getElementById('left_nav_section_img_'+number).src= 'http://images.designknights.com/plusbox.png'; } } function confirm_delete_module() { var answer = confirm("Are you sure you want to delete an entire module. This process is not undoable. You will loose all pages in this module. We stronly recomend you backup before doing this.") if (answer){ redirect ("http://movies.designknights.com/index.php?m=admin&p=pageMgmt&a=mod_del_sel"); } else{ redirect ("http://movies.designknights.com/index.php?m=admin&p=pageMgmt"); } } function move_box(an, box) { var cleft = 0; var ctop = 0; var obj = an; while (obj.offsetParent) { cleft += obj.offsetLeft; ctop += obj.offsetTop; obj = obj.offsetParent; } box.style.left = cleft + 'px'; ctop += an.offsetHeight + 8; if (document.body.currentStyle && document.body.currentStyle['marginTop']) { ctop += parseInt( document.body.currentStyle['marginTop']); } box.style.top = ctop + 'px'; } function updateClock ( ) { var currentTime = new Date ( ); var currentHours = currentTime.getHours ( ); var currentMinutes = currentTime.getMinutes ( ); var currentSeconds = currentTime.getSeconds ( ); // Pad the minutes and seconds with leading zeros, if required currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes; currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds; // Choose either "AM" or "PM" as appropriate var timeOfDay = ( currentHours < 12 ) ? "am" : "pm"; // Convert the hours component to 12-hour format if needed currentHours = ( currentHours > 12 ) ? currentHours - 12 : currentHours; // Convert an hours component of "0" to "12" currentHours = ( currentHours == 0 ) ? 12 : currentHours; // Compose the string for display var currentTimeString = currentHours + ":" + currentMinutes + ":" + currentSeconds + " " + timeOfDay; // Update the time display document.getElementById("c").firstChild.nodeValue = currentTimeString; } function submitform(){document.form1.submit();} function show_hide_box(an, width, height, borderStyle) { var href = an.href; var boxdiv = document.getElementById(href); if (boxdiv != null) { if (boxdiv.style.display=='none') { move_box(an, boxdiv); boxdiv.style.display='block'; } else boxdiv.style.display='none'; return false; } boxdiv = document.createElement('div'); boxdiv.setAttribute('id', href); boxdiv.style.display = 'block'; boxdiv.style.position = 'absolute'; boxdiv.style.width = width + 'px'; boxdiv.style.height = height + 'px'; boxdiv.style.border = borderStyle; boxdiv.style.backgroundColor = '#fff'; var contents = document.createElement('iframe'); contents.scrolling = 'auto'; contents.name = 'popupbox'; contents.frameBorder = '0'; contents.style.width = width + 'px'; contents.style.height = height + 'px'; contents.src = href; boxdiv.appendChild(contents); document.body.appendChild(boxdiv); move_box(an, boxdiv); return false; }