
/*****                         CAFE24 CHAT 2.53.06                       *****/
/*****                                                                   *****/
/*****                                           Programmed by DDART     *****/
/*****                              Last Update 2002.05.21, 10:50:21     *****/
/*****                  Copyright ¨Ï Simplex Internet Inc, 2000-2001     *****/
function DhtmlObjectControl(){
	initiate();
	this.getObject =	getObject;
	this.getStyle =		getStyle;
	this.setStyle =		setStyle;
	this.remove =		remove;	
	this.move =		move;
	this.rewrite =		rewrite;
	this.write =		write;
	this.className =	className;
	this.color    = color;
	this.show =		show;
	this.hide =		hide;
	this.showcell =		showcell;
	this.hidecell =		hidecell;
	this.writeAfter =	writeAfter;
	this.writeBefore =	writeBefore;
	this.open =		open;
	this.innerOpen = innerOpen;
	this.prompt   = prompt;
	this.focus =		focus;

	function open(url,target,width,height,scrollbar,resizable){
		if (!scrollbar)	scrollbar='no';
		if (!resizable)	resizable='no';
		var posLeft=parseInt((window.screen.availWidth-width)/2);
		var posTop=parseInt((window.screen.availHeight-height)/2);
		var oWindow = window.open(url,target,"left="+posLeft+",top="+posTop+",width="+width+",height="+height+",menubar=no,scrollbars="+scrollbar+",resizable="+resizable);
		if (oWindow){
			oWindow.focus();
			return oWindow;
		}
		else	return null;
	}
	function innerOpen(url,width,height){
		return window.showModelessDialog(url,window,'dialogWidth:'+width+'px;dialogHeight:'+height+'px;status:no;resizable:no;help:no;');		
	}	
	function prompt(url,width,height){
		return window.showModalDialog(url,window,'dialogWidth:'+width+'px;dialogHeight:'+height+'px;status:no;');
	}	
	function remove(id){
	  var oElement=this.getObject(id);
	  if (oElement)	oElement.removeNode(true);		
	}	
	function move(id,l,t){
		var oElement=this.getStyle(id);
		if (oElement){
			oElement.posLeft=l;
			oElement.posTop=t;
		}
	}
	function focus(id){
		var oElement=this.getObject(id);
		if (oElement)	oElement.focus();
	}
	function getObject(id){
		if (typeof(id) == "object")					return id;
		else if (typeof(window.document.all[id]) == "object")	return window.document.all[id];
		else								return null;
	}
	function getStyle(id){
		var oElement=this.getObject(id);
		if (oElement && typeof(oElement.style)=="object")	return oElement.style;
		else							return null;
	}
	function rewrite(id,h) {
		var oElement=this.getObject(id);
		if (oElement)	oElement.innerHTML=h;
	}
	function write(id,h){
		var oElement=this.getObject(id);
		if (oElement){
			oElement.insertAdjacentHTML("beforeEnd",h);
		}
	}
	function writeAfter(id,html){
		var oElement=this.getObject(id);
		if (oElement)	oElement.insertAdjacentHTML("afterEnd",html);
	}
	function writeBefore(id,html){
		var oElement=this.getObject(id);
		if (oElement)	oElement.insertAdjacentHTML("beforeBegin",html);
	}
	function className(id,className){
		var oElement=this.getObject(id);
		if (oElement)	oElement.className=className;
	}
	function color(id,f,b){
		var oElement=this.getStyle(id);
		if (oElement){
			oElement.color=f;
			oElement.backgroundColor=b;
		}
	}	
	function hide(){
		this.setStyle(arguments,'visibility','hidden');
	}
	function show(){
		this.setStyle(arguments,'visibility','visible');
	}
	function hidecell(){
		this.setStyle(arguments,'display','none');
	}
	function showcell(){
		this.setStyle(arguments,'display','');
	}
	function setStyle(args,prop,value){
		var oElement;
		for (var i=0;i<args.length;i++)
			if (oElement=this.getStyle(args[i]))	oElement[prop]=value;
	}

	/* Private */
	function initiate(){
		if (navigator.appName.match(/Explorer/i))	CST_VER =navigator.appVersion.match(/MSIE \d+.\d+/)[0].split(" ")[1];
		else						CST_VER =0;
	}
}

var oc = new DhtmlObjectControl();