/*
 * 	application
 * 	frameset for current web
 * 
 * */
 

 var appsite = Class.create({
	
	initialize:function(){
		document.observe('dom:loaded',function(){
			//AppSite.makeTopNoScroll();
			//init_site();
			
			AppSite.loadPIms();
			
			
				
		});
		this.ims=new Array();
	},
	makeTopNoScroll:function(){
		
		$('margenmenu').setStyle({height:$('topcontent').getHeight()+'px'});
		
	},
	launch:function(funct){
		document.observe('dom:loaded',function(){
			eval(htmlspecialchars_decode(funct,'ENT_QUOTES'));	
		});
	},
	errorPIms:function(){
		
	},
	loadPIms:function(){
		
		if(this.currIm<this.pImages.length){
			var img = new Image();
		
			this.currIm+=1;
			img.onload=this.loadPIms();
			img.onerror=this.errorPIms();
			img.src=this.pImages[this.currIm];
			return true;			
		}
		
		if (this.currIm>10){return false;};
		init_site();
	},
	
	preLIms:function(){
		var a=this.preLIms.arguments;
		this.pImages=Array();
		if (a.length){
			for(var i=0; i<a.length;i++){
				this.pImages.push(a[i]);
			}
			this.currIm=0;
		}
	}

	
});
AppSite = new appsite();

 