function writeStatus(){
	if(debug && !debugWindow.closed){
		statusString = ":" + loopCount + " Loaded: "+allsystemsgo+" Slide: "+slide + " State: " +playerState + "<BR><HR noshade size=1>";
		
		if(is.ns4){
			if(debugWindow.document != null && debugWindow.document['statusLayer'] !=null){
				debugWindow.document['statusLayer'].document.write(statusString);
				debugWindow.document['statusLayer'].document.close();
			}
		} else if(is.ie) {
		
			debugWindow.document.all.statusLayer.innerHTML = statusString;
		
		} else if(document.implementation &&document.implementation.hasFeature && document.implementation.hasFeature("html", "1.0")){
			// asuming ns6....
			
			debugWindow.document.getElementById('statusLayer').innerHTML = statusString;
		} else {
			alert("can't debug w/this browser...");
		}
	}

}

function writeDebug(text){

	if((debug && !debugWindow.closed) || remoteDebug)
		debugString = ":" + loopCount + " " + text + "\n<BR>" + debugString;

	if(debug && !debugWindow.closed){
		if(is.ns4){
			if(debugWindow.document != null && debugWindow.document['debugLayer'] !=null){
				debugWindow.document['debugLayer'].document.write(debugString);
				debugWindow.document['debugLayer'].document.close();
			}
		} else if(is.ie) {
		
			debugWindow.document.all.debugLayer.innerHTML = debugString;
		
		} else if(document.implementation &&document.implementation.hasFeature && document.implementation.hasFeature("html", "1.0")){
			// asuming ns6....
			
			debugWindow.document.getElementById('debugLayer').innerHTML = debugString;
		} else {
			alert("can't debug w/this browser...");
		}
	}

}

function makeCenterPopup(file, name, w, h){
	var xPos, yPos;
	var winProp;	
	
	xPos = (screen.width/2)-(w/2);
	yPos = (screen.height/2)-(h/2);
	
	winProp = "width=" + w + ",height=" + h + ",left=" + xPos + ",top=" + yPos +",scrollbars=1,resizable=1,status=0";

	if(name == 'debug')
		debugWindow = window.open(file, name, winProp);	
	else
		remoteDebugWindow = window.open(file, name, winProp);	
		
	if(name == 'debug')
		debugWindow.moveTo(0,0);
	
	debugWindow.focus();
	window.focus();
}

