
var myWidth = 0;
var myHeight = 0;
var myScroll = 0;
var myScrollWidth = 0;
var myScrollHeight = 0;
var _opa;
var _cls;
var _all;

	function parseCookie() 
	{
	   var cookieList = document.cookie.split("; ");
	   var cookieArray = new Array();
	   for (var i = 0; i < cookieList.length; i++) {
		   var name = cookieList[i].split("=");
		   cookieArray[unescape(name[0])] = unescape(name[1]);
		}
	   return cookieArray;
	} 
function getSize() {
	// Window Size
	if (self.innerHeight) { // Everyone but IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
		myScroll = window.pageYOffset;
	} else if (document.documentElement && document.documentElement.clientHeight) { // IE6 Strict
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
		myScroll = document.documentElement.scrollTop;
	} else if (document.body) { // Other IE, such as IE7
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
		myScroll = document.body.scrollTop;
	}
	// Page size w/offscreen areas
	if (window.innerHeight && window.scrollMaxY) {
		myScrollWidth = document.body.scrollWidth;
		myScrollHeight = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight) { // All but Explorer Mac
		myScrollWidth = document.body.scrollWidth;
		myScrollHeight = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		myScrollWidth = document.body.offsetWidth;
		myScrollHeight = document.body.offsetHeight;
	}
} 
	function open_big(src, w, h){
		var text_out = "<div id='opa'><img id='full_imgs' src='"+ src +"' width='"+w+"' height='"+h+"'>"
		var text_out = text_out + "\n</div><div id='cls'><img src='closebox.png' onClick='close_big();'></div>";
		var text_out = text_out + "\n</div><div id='all2' onClick='close_big();' style=\"position: absolute;margin: auto;top: 0;left: 0;width: 100%;height: 100%;background-color:black;filter:alpha(opacity=20);-khtml-opacity:0.2;-moz-opacity:0.20;opacity:0.20;\">&nbsp;</div>";
		//document.write(text_out);
		if(_opa != undefined)
		{
			_opa.style.visibility = 'visible';
			_opa.style.display = 'inline';
			_cls.style.visibility = 'visible';
			_cls.style.display = 'inline';
			_all.style.visibility = 'visible';
			_all.style.display = 'inline';
		}
		document.getElementById('resizeimage').innerHTML = text_out;
		//document.body.innerHTML = document.write(text_out);
		_opa = document.getElementById('opa');
		_cls = document.getElementById('cls');
		_all = document.getElementById('all2');
		var _fu = document.getElementById('full_imgs');
		//setup_abs position
		_opa.style.position = 'absolute';
		_cls.style.position = 'absolute';
		_all.style.position = 'absolute';
		getSize();
		
		_all.style.zIndex = '9';
		_opa.style.zIndex = '10';
		_cls.style.zIndex = '11';
		
		_opa.style.border = '1px solid #202020';
		var tmp = '';
		tmp = tmp + (myWidth - w )/ 2;
		tmp = tmp + 'px';
		_opa.style.left = tmp;
		tmp = '';
		if(((myHeight - h )/ 2) < 0)
			tmp = '15';
		else
			tmp = tmp + (((myHeight - h )/ 2) + myScroll);
		tmp = tmp + 'px';
		_opa.style.top = tmp;
		
		_cls.style.cursor = 'pointer';
		tmp = '';
		tmp = tmp + ((myWidth + w )/ 2) -15;
		tmp = tmp + 'px';
		_cls.style.left = tmp;
		tmp = '';
		if(((myHeight - h )/ 2) < 0)
			tmp = '0';
		else
			tmp = tmp + ((myHeight - h )/ 2) -15 + myScroll;
		tmp = tmp + 'px';
		_cls.style.top = tmp;
		_all.style.width = '100%';
		_all.style.height = myScrollHeight + 'px';
var g = parseCookie();
var ccc = "001";
	}
	function close_big()
	{
		_opa.style.visibility = 'hidden';
		_opa.style.display = 'none';
		_cls.style.visibility = 'hidden';
		_cls.style.display = 'none';
		_all.style.visibility = 'hidden';
		_all.style.display = 'none';
		
	}
