//
// Dimension_detect
function dimension_detect(){
	var d={
		'viewW':0, //viewPort Width
		'viewH':0, //viewPort Height
		'docH':0,  //document Height
		'docW':0,  //document Width
		'left':0,  //content Left Position according to the document flow
		'top':0    //content top position according to the document flow
	};
	if(document.body.scrollHeight>document.body.offsetHeight){
		d.docW=document.body.scrollWidth;
		d.docH=document.body.scrollHeight;
	}
	else{
		d.docW=document.body.offsetWidth;
		d.docH=document.body.offsetHeight;
	}
	if(self.innerWidth){
		d.viewW=self.innerWidth;
		d.viewH=self.innerHeight;
		d.left=window.pageXOffset;
		d.top=window.pageYOffset;
	}else{
		var ie=(document.compatMode&&document.compatMode!='BackCompat')?document.documentElement:document.body;
		d.viewW=ie.clientWidth;
		d.viewH=ie.clientHeight;
		d.left=ie.scrollLeft;
		d.top=ie.scrollTop;
	}
	return d;
};