function killErrors() {
return true;
}
window.onerror = killErrors;
function MM_reloadPage(init) { // reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i
0) {
var siteStyles = document.styleSheets[0];
siteStyles.addRule("cinput", "font-size:9pt; height:18px;
width:100px;");
}
}
function toggleid(targetid) {
var isnow = document.getElementById(targetid).style.display;
if ( isnow == 'block' ) {
document.getElementById(targetid).style.display='none';
} else {
document.getElementById(targetid).style.display='block';
}
}
function showid(thingid) {
document.getElementById(thingid).style.display = 'block';
}
function hideid(thingid) {
document.getElementById(thingid).style.display = 'none';
}
function setClass(thingid, new_classname) {
document.getElementById(thingid).className = new_classname;
}
//---------------------------------------------
// Replaces document.getElementById :)
//---------------------------------------------
if ( !$ && Function != $.constructor ) {
function $() {
var elements = new Array();
for (var i = 0; i < arguments.length; i++) {
var element = arguments[i];
if (typeof element == 'string')
element = document.getElementById(element);
if (arguments.length == 1)
return element;
elements.push(element);
}
return elements;
}
}
function mkObject() {
var x;
var browser = navigator.appName;
if ( browser == "Microsoft Internet Explorer" ) {
x = new ActiveXObject("Microsoft.XMLHTTP");
} else {
x = new XMLHttpRequest();
}
return x;
}
var request = mkObject();
function ajaxGet(qryString, boxid) {
rezBox = boxid; // Make global so parseInfo can get it
request.open('get', qryString);
request.onreadystatechange = placeInfo;
request.send('');
}
function placeInfo() {
if ( request.readyState == 1 ) {
document.getElementById(rezBox).innerHTML = 'Loading...';
}
if ( request.readyState == 4 ) {
var answer = request.responseText;
document.getElementById(rezBox).innerHTML = answer;
}
}
function windowResize(h, w){
//alert('ok resize')
var daWindow = Windows.getWindow("admin_dialog")
daWindow.setSize(h, w)
daWindow.showCenter(true);
}
var isShowing = null;
function minEme(winId){
var daWindow = Windows.getWindow(winId)
if(daWindow.isMinimized){
$('admin_dialog').style.height='25px'
}else{
$('admin_dialog').style.height='555px'
}
daWindow.minimize()
daWindow._checkIEOverlapping()
}
// F2 shortcut login
function mouse_capture( event ) {
// This is here to make it easier to login to admin section
var key = event.which;
var key = event.keyCode;
if (key == 113){
window.open("http://www.4thway.co.nz/sohoadmin/index.php?keystroke=on","adminlogin","width=560,height=331,resizable=no,scrollbars=yes");
}
return;
} // End Func
// Workaround for IE's infinite z-index issue
// Hide all dropdown boxes
function hide_dropdowns() {
dropdowns = document.getElementsByTagName("select");
for ( i = 0; i < dropdowns.length; i++ ) {
dropdowns[i].style.display = 'none';
}
}
// Show all dropdown boxes
function show_dropdowns() {
dropdowns = document.getElementsByTagName("select");
for ( i = 0; i < dropdowns.length; i++ ) {
dropdowns[i].style.display = 'inline';
}
}
/*
Written by Jonathan Snook, http://www.snook.ca/jonathan
Add-ons by Robert Nyman, http://www.robertnyman.com
*/
function getElementsByClassName(oElm, strTagName, oClassNames){
var arrElements = (strTagName == "*" && oElm.all)? oElm.all :
oElm.getElementsByTagName(strTagName);
var arrReturnElements = new Array();
var arrRegExpClassNames = new Array();
if(typeof oClassNames == "object"){
for(var i=0; i