///////////////////////////////////////////
/////////  GenMeta1 & Meta1 //////////////
//////////////////////////////////////////

function GenMeta1_Meta1(){
	this.myBrowser=new MyBrowser()
	this.resized=0
}
GenMeta1_Meta1.prototype.__Meta1_init=
GenMeta1_Meta1.prototype._init=
function _init(){
	if(window.addEventListener){
		window.addEventListener("resize",resize,false)
	}else{
		window.attachEvent("onresize",resize)
	}
	this.resetMenu=0
this.resetMenus=new Array()	
	window.onload=this.onload()
	this.canvas=document.getElementById("canvas")
	this.canvas.onmouseover=this.associateObjWithEvent( this,"canvasMouseover")
	mybody=document.getElementById("body")
	mybody.onclick=this.associateObjWithEvent( this,"bodyClick")
}
GenMeta1_Meta1.prototype.associateObjWithEvent=
function (obj,methodName){
    return (function(e){
        e = e||window.event;
        return obj[methodName](e, this);
    });
}
GenMeta1_Meta1.prototype.associateObjWithFunc=
function (obj,methodName){
    return (function(parms){
        return obj[methodName](this,parms);
    });
}
GenMeta1_Meta1.prototype.canvasMouseover=
function (obj,methodName){

	if((this.resetMenu)
	&&(this.resetMenu.parms.isResetMenu=="canvasMouseout")){
		this.resetMenu.resetMenu()
		this.resetMenu=0
	}
}
GenMeta1_Meta1.prototype.canvasClick=
function (obj,methodName){
return
alert("canvasClick")
	for(var x=0;x<this.resetMenus.length;x++){
		if((this.resetMenus[x])
		&&( this.resetMenus[x].parms.isResetMenu=="canvasClick")){
alert(x)		
			this.resetMenus[x].resetMenu()
			this.resetMenu[x]=0
		}
	}
}
GenMeta1_Meta1.prototype.__Meta1_getHrefBase=
GenMeta1_Meta1.prototype.getHrefBase=
function getHrefBase(funcPageId){
	if(isLocal){
		var str="index.php?"
	}else{
		var str=this.getUrlBase()+"/index.php?"
	}
	if(funcPageId)str+="pageId="+funcPageId
	return str
}
GenMeta1_Meta1.prototype.getUrlBase=
function getUrlBase(){
	if(isLocal=='1'){
		return "http://localhost"
	}else{
		return url
	}
}
GenMeta1_Meta1.prototype.mousemove=
function (event,element){
	var evt=new MyMouseEvent(event)
	this.mousemoveXY=evt.getMouseXY()
}
GenMeta1_Meta1.prototype.bodyClick=
function (obj,methodName){
}
GenMeta1_Meta1.prototype.__Meta1_onFontResize=
GenMeta1_Meta1.prototype.onFontResize=
function onFontResize(){
//	alert("onFontResize")
}
GenMeta1_Meta1.prototype.__Meta1_onload=
GenMeta1_Meta1.prototype.onload=
function onload(){
}
GenMeta1_Meta1.prototype.resize=
function resize(){
	switch(bd.browser){
	case "Netscape":this.resizeIt();return
	default:
		if(this.resized){
			this.resized=0
		}else{
			this.resizeIt()
		}	
	}
}
GenMeta1_Meta1.prototype.__Meta1_resizeIt=
GenMeta1_Meta1.prototype.resizeIt=
function resizeIt(){
	if(isLocal)this.resized=1
	this.myBrowser=new MyBrowser()
}
//////////////// deprecate //////////////////
GenMeta1_Meta1.prototype.__Meta1_setMenu=
GenMeta1_Meta1.prototype.setMenu=
function setMenu(parent,myXml,parms){
	this.menu=new Menu(parent,myXml,parms)
	this.menu.build(pageId)
}
///////////////////////////////////////////////
GenMeta1_Meta1.prototype.setMousemoveOn=
function setMousemoveOn(){
	document.onmousemove=this.associateObjWithEvent(this,"mousemove")
	if(bd.browser!="IE")document.captureEvents(Event.MOUSEMOVE)
}	
//////////////////////////////////////////////
//////////////////////////////////////////////
GenMeta1.deriveFrom(GenMeta1_Meta1)
function GenMeta1(){
	this.GenMeta1_Meta1()
}
GenMeta1.prototype.__GenMeta1_init=
function _init(){
	this.__Meta1_init() 
	this.setMousemoveOn()
}
GenMeta1.prototype.setCurvyCorners=
function (){
	settings={
		tl:{radius:10},
		tr:{radius:10},
		bl:{radius:10},
		br:{radius:10},
		antiAlias:true,
		autoPad:false
	} 
	var cornersObj=new curvyCorners(settings,"rounded")
	cornersObj.applyCornersToAll()
}
