// JavaScript Document
function show_shop()
{
	var pic = document.getElementById("shop");
	var height = pic.height;
	var width = pic.width;
	var left = pic.offsetLeft;
	var top = pic.offsetTop;
	var pic = document.createElement("img");
	pic.setAttribute('src','images/banner_shop.jpg');
	pic.setAttribute("id","shop_big");
	if (navigator.appName == "Microsoft Internet Explorer")
	{
		pic.style.setAttribute("width",width);
		pic.style.setAttribute("height",height);
		pic.style.setAttribute("left",left);
		pic.style.setAttribute("top",top);
		pic.style.setAttribute('position','absolute');
	}
	else
	{
		pic.style.width = width + "px";
		pic.style.height = height + "px";
		pic.left = left + "px";
		pic.top = top + "px";
		pic.style.position = "absolute";
	}
	document.getElementById("area").insertBefore(pic,document.getElementById("head1"));
	var pic = document.getElementById("shop_big");
	dif = width / height;
	while(top > 0)
	{
		height = height + 1;
		width = width + 1 * dif;
		top = top - 1;
		left = left - 1 * dif;
		if (navigator.appName == "Microsoft Internet Explorer")
		{
			pic.style.setAttribute("width",width);
			pic.style.setAttribute("height",height);
			pic.style.setAttribute("top",top);
			pic.style.setAttribute("left",left);
		}
		else
		{
			pic.style.width = width + "px";
			pic.style.height = height + "px";
			pic.style.top = top + "px";
			pic.style.left = left + "px";
		}
	}
	if (navigator.appName == "Microsoft Internet Explorer")
		pic.style.setAttribute("height","");
	else
		pic.style.height = "";

	while(width < 1024)
	{
		width = width + 1;
		left = left - 1;
		if (navigator.appName == "Microsoft Internet Explorer")
		{
			pic.style.setAttribute("width",width);
			pic.style.setAttribute("left",left);
		}
		else
		{
			pic.style.width = width + "px";
			pic.style.left = left + "px";
		}
	}
	window.setTimeout("location.reload()",7000);
}
function hide_head2()
{
	var element = document.getElementById('head2');
	if (navigator.appName == "Microsoft Internet Explorer")
		var element_height = parseInt(element.currentStyle.height);
	else
		var element_height = parseInt(window.getComputedStyle(element, null).height);

	for (y = element_height;y >= 1; y = y -1)
	{
		if (navigator.appName == "Microsoft Internet Explorer")
			document.getElementById('head2').style.setAttribute('height', y + "px",false);
		else
			document.getElementById('head2').style.height = y + "px";
	}
}
function objectsize(object, left, top, width, height)
{
// alert(width+", "+height);
 if (navigator.appName == "Microsoft Internet Explorer")
 {
  if (width != '') object.style.setAttribute("width", width + "px");
  if (height != '') object.style.setAttribute("height", height + "px");
  if (left != '') object.style.setAttribute("left", left + "px");
  if (top != '') object.style.setAttribute("top", top + "px");
 }
 else
 {
  if (width != '') object.width = width + "px";
  if (height != '') object.height = height + "px";
  if (left != '') object.left = left + "px";
  if (top != '') object.top = top + "px";
 }
}
function objectsize2(left, top, width, height)
{
 if (navigator.appName == "Microsoft Internet Explorer")
 {
  if (width != '') e1.style.setAttribute("width", width + "px");
  if (height != '') e1.style.setAttribute("height", height + "px");
  if (left != '') e1.style.setAttribute("left", left + "px");
  if (top != '') e1.style.setAttribute("top", top + "px");
 }
 else
 {
  if (width != '') e1.width = width + "px";
  if (height != '') e1.height = height + "px";
  if (left != '') e1.left = left + "px";
  if (top != '') e1.top = top + "px";
 }
}
function PictureFromCorner()
{
 left = document.getElementById("area").offsetLeft + 1024 + 2;
 var e1 = document.createElement("img");
 e1.setAttribute("src", "images/banner_shop.jpg");
/* e1.setAttribute("width", "10");
	alert(e1.height);*/
 zoom = e1.height / e1.width;
	e1.style.setAttribute("width", 1 + "px");
	e1.style.setAttribute("height", 1 * zoom + "px");
	e1.style.setAttribute("position", "absolute");
	e1.style.setAttribute("left", left + "px");
	e1.style.setAttribute("top", 0);
	document.getElementById("area").appendChild(e1);
 var wait = 100;
	var height;
	for (w = 1; w <= 5; w++)
 {
  left = left - 1;
		objectsize(e1, left, 0, w, w * zoom);
//	 height = (Math.round(w * zoom));
//		alert(zoom + "/" + height);
//		t = "objectsize(" + e1 + "," + left + ",0," + w + "," + height + ")";
//		alert(t);
//		window.setTimeout(t, wait};
		wait = wait + 10;
	}
}

