/* dating website clientside scripts 
 * peter assenov- AIP Solutions Ltd.' 2003
 * @core:	2.1
 * @version:0.7.0.1/29.12.2003
 */
/* module initialisation and version checkup */
modpublic=new Object();
modpublic.core=2.1; 
if(window.version!=modpublic.core)	alert('Warning!\n------------------------------------------------\nmodule public has encountered compatability problem: \n\ncore version is: '+window.version+'; should be: '+modpublic.core);
/* public scripts */
var ie=(document.all)? 1:0;
var	opr=(navigator.userAgent.indexOf('Opera')!=-1)? 1:0;
var moz=(ns6&&navigator.userAgent.indexOf('Netscape')==-1)? 1:0;

/* visual corrections */
/* positions the active window in the middle of the screen */ 
page.pos='top';															
page.setPos=function(cont)
{	this.w=parseInt(this.css.attr('#'+cont,'width',null));					
	this.h=parseInt(this.css.attr('#'+cont,'height',null));
	this.winw=(ns6||opr)? window.innerWidth:document.body.offsetWidth;			
	this.winh=(ns6||opr)? window.innerHeight:document.body.offsetHeight;
	this.x=parseInt((this.winw-this.w)/2);									
	this.y=(this.pos=="middle")? parseInt((this.winh-this.h)/2) : 0;			
	if(!ns6) this.x-=8;
	this.css.attr('#'+cont,'left',(this.x>0)?this.x+'px':'0px');							
	this.css.attr('#'+cont,'top',(this.y>0)?this.y+'px':'0px');
log.add((this.x)?'- page positioned to: x->'+this.x+' y->'+this.y:'! fail to calculate page position');
}
/* centers the window on size changes */
onresize=function(){page.setPos('content')}

log.add((window.version=modpublic.core)?"# public initialisation completed":"! incorect version of public module");
/* end of public scripts */
