    var host    = '';

function pop_register(sid){ 
    go_popup(host+'register/index.php'+sid,500,400,'register','yes');
    }
function pop_sermon(sermon){ 
    go_popup(host+'player/index.php'+sermon,500,300,'sermon','yes');
    }
function pop_n(n_id){ 
    go_popup(host+'view.php?sec=news&n_id='+n_id,590,460,'news','yes');
    }

function pop_p(p_id){ 
    go_popup(host+'/template/view.php?sec=products&p_id='+p_id,590,460,'products','yes');
    }

function pop_p_a(p_id){ 
    go_popup(host+'/template/view.php?sec=products&p_id_a='+p_id,590,460,'products','yes');
    }

function go_popup(path,w,h,wname,scroll){
    p='width='+w+',height='+h+',resizable=no,toolbar=no,location=no,directories=no,status=no,scrollbars='+scroll+',menubar=no';
    xxx=window.open(path,wname,p);
    window.xxx.focus();
}


function openw( url, name, width, height ) {
  if ( height < 100 ) height = 100; if ( width < 100 ) height = 100;
  var top = screen.availHeight / 2 - height / 2;
  var left = screen.availWidth / 2 - width / 2;
  var w = window.open( url, name, 'resizable=no,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,top='+top+',left='+left+',height='+height+',width='+width );
  w.focus();
  return true;
}

function newImage(arg) {
    if (document.images) {
        rslt = new Image();
        rslt.src = arg;
        return rslt;
    }
}
function changeImages() {
    if (document.images && (preloadFlag == true)) {
        for (var i=0; i<changeImages.arguments.length; i+=2) {
            document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
        }
    }
}
function hideShowMe(theThing)
{
	if (theThing.style.display == 'none')
	{
		theThing.style.display = 'block';
	}
	else
	{
		theThing.style.display = 'none';
	}
}
