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; } function redirectBox(){ alert('The Ideas Book just kept on getting bigger and so The SOHO Agency has been launched.......Here you will now find not only the fabulous Ideas Book Volumes 1 & 2, but also a range of essential ideas, advice, templates, ‘How to Guides’ and services to help you plan, launch and grow your own home based or small business ALL of which have been sourced, developed and used and approved by Sophie Andrews, a fellow entrepreneur located in Avalon on Sydney’s Northern Beaches.'); window.location ='http://www.thesohoagency.com.au'; } function redirectTimeout(){ var timeout = setTimeout("window.location='http://www.thesohoagency.com.au'",10000); } function showPopUp(el) { var cvr = document.getElementById('cover'); var dlg = document.getElementById(el); cvr.style.display = "block"; dlg.style.display = "block"; if (document.body.style.overflow = "hidden") { cvr.style.width = "100%"; cvr.style.height = "100%"; } } function closePopUp(el) { var cvr = document.getElementById('cover'); var dlg = document.getElementById(el); cvr.style.display = "none"; dlg.style.display = "none"; document.body.style.overflowY = "scroll"; }