 function center(MaxW,MaxH)
 {
	 
 	var height=0; 
    var width=0; 
	var marginH = 0;
	var marginW = 0;

			this.width = window.innerWidth ?
            width = window.innerWidth : width = document.body.clientWidth;
		    this.height = window.innerHeight ?
            height = window.innerHeight : height = document.body.clientHeight;
		
		if(height > MaxH)
			marginH = (height-MaxH)/2;
		if(width > MaxW)
			marginW = (width-MaxW)/2;
			
		document.getElementById ('reWidth').style.width = marginW + "px";
		document.getElementById ('reWidth').style.height = "650px";
		document.getElementById ('reHeight').style.height = marginH + "px";
		document.getElementById ('reHeight').style.width ="1px";

 }
 
 function header(maximum,noPad,pad,charW)
 {
/*	var spanW=0;
	var divW=62;
	var i=0;
	var j=0;
	var unicode=0;
	var temp=0;
	var char=0;
	
	spanW = document.getElementById ('header1').innerHTML;
	for(i=0;i<maximum;i++)
	{
		if(spanW[i] != undefined)
		{
			unicode++;
		}
	}
	alert(unicode);
	if(unicode < noPad)*/
		document.getElementById ('headerW').style.width ="62px";
/*	else
	{
		temp = pad - (unicode-noPad)*charW;
		if(temp>0)
			document.getElementById ('headerW').style.width = temp + "px";
		else
			document.getElementById ('headerW').style.width = "62px";
	}
	for(i=0;i<maximum;i++)
	{
		if(!char)
			char = spanW[i];
		else
			char += spanW[i];
	}
		document.getElementById ('header1').innerHTML = char;
		unicode = 0;*/
 }
 
 function SetPercent(ID)
 {
	 var percent;
	 percent = document.getElementById ('percent'+ID).innerHTML;
	 document.getElementById ('setpercent'+ID).style.width = percent*2 + "px";
 }