// JavaScript Document
function shade_layer(info_to_view, width_of_box, height_of_box, bground, image_id, image_width, image_height)
{
	if (info_to_view == "info")
	{
		var information = "<div style='width: 100%; height: 40px; text-align: right; padding-top: 10px; padding-right: 10px;'><a onclick=shade_layer('none','0','0','FFFFFF','0','0','0'); class=a_link>Close <img src='images/icon-delete.png' width=11 height=11 border=0></a>&nbsp;&nbsp;<div><div style='width: 100%; height: 436px; padding-right: 10px; padding-left: 10px; text-align: center;'><div style=\"width:" + image_width + "px; height:" + image_height + "px; z-index: 600; background: url(\'get_prod_img.php?id=" + image_id + "&width=704&height=466&max_height=466&max_width=704\') no-repeat; *background:url(); *filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='get_prod_img.php?id=" + image_id + "&height=466&width=704&max_height=466&max_width=704\', sizingMethod=\'scale\');\"></div></div><div id='product_popup_text' style='width: 100%; height: 20px; text-align: center; padding-bottom: 10px; padding-left: 10px; padding-right: 10px;'></div>";
		scroll(0, 0);

		document.getElementById('shade_info_box_1').innerHTML = information;
		document.getElementById('shade_holder').style.display = 'block';
		document.getElementById('shade_layer').style.display = 'block';
		document.getElementById('shade_info_holder').style.display = 'block';
		document.getElementById('shade_info_box_1').style.display = 'block';
		document.getElementById('shade_info_box_1').style.width = width_of_box + 'px';
		document.getElementById('shade_info_box_1').style.height = height_of_box + 'px';
		document.getElementById('shade_info_box_1').style.background = '#' + bground;
	}
	if (info_to_view == "img")
	{
		if(image_id == "GWSAMPLE")
		{
			var information = "<div style='width: 100%; height: 40px; text-align: right; padding-top: 10px; padding-right: 10px;'><a onclick=shade_layer('none','0','0','FFFFFF','0','0','0'); class=a_link>Close <img src='images/icon-delete.png' width=11 height=11 border=0></a>&nbsp;&nbsp;<div><div style='width: 100%; height: 436px; padding-right: 10px; padding-left: 10px; text-align: center;'><div style=\"width: 420px; height: 339px; z-index: 600; background: url(\'images/gift_wrap_sample.jpg\') no-repeat;\"></div></div><div id='product_popup_text' style='width: 100%; height: 20px; text-align: center; padding-bottom: 10px; padding-left: 10px; padding-right: 10px;'></div>";
		}
		else
		{
			var information = "<div style='width: 100%; height: 40px; text-align: right; padding-top: 10px; padding-right: 10px;'><a onclick=shade_layer('none','0','0','FFFFFF','0','0','0'); class=a_link>Close <img src='images/icon-delete.png' width=11 height=11 border=0></a>&nbsp;&nbsp;<div><div style='width: 100%; height: 436px; padding-right: 10px; padding-left: 10px; text-align: center; background-color: #b3b7bd;'><iframe frameborder='0' style='width: 744px; height: 456px; text-align: left;' src='includes/popup_img.php?id=" + image_id + "&width=704&height=436&max_height=436&max_width=704&style=jpg&bg=179|183|189' frameborder='0' scrolling='no'></iframe></div><div id='product_popup_text' style='width: 100%; height: 20px; text-align: center; padding-bottom: 10px; padding-left: 10px; padding-right: 10px;'></div>";
		}

		scroll(0, 0);

		document.getElementById('shade_info_box_1').innerHTML = information;
		document.getElementById('shade_holder').style.display = 'block';
		document.getElementById('shade_layer').style.display = 'block';
		document.getElementById('shade_info_holder').style.display = 'block';
		document.getElementById('shade_info_box_1').style.display = 'block';
		document.getElementById('shade_info_box_1').style.width = width_of_box + 'px';
		document.getElementById('shade_info_box_1').style.height = height_of_box + 'px';
//		document.getElementById('shade_info_box_1').style.background = '#' + bground;
	
		$("#shade_layer").bgiframe();	
	}
	else if (info_to_view == "content")
	{
		var information = 	"<p class=\"close\"><a><a onclick=shade_layer('none','0','0','FFFFFF','0','0','0'); class=a_link>Close <img src='images/icon-delete.png' width=11 height=11 border=0></a></p>";
		information += 		"<iframe frameborder='0' src='includes/inc.get_content_page.php" + image_id + "'></iframe>";
		scroll(0, 0);

		document.getElementById('shade_info_box_1').innerHTML = information;
		document.getElementById('shade_holder').style.display = 'block';
		document.getElementById('shade_layer').style.display = 'block';
		document.getElementById('shade_info_holder').style.display = 'block';
		document.getElementById('shade_info_box_1').style.display = 'block';
		document.getElementById('shade_info_box_1').style.width = width_of_box + 'px';
		document.getElementById('shade_info_box_1').style.height = height_of_box + 'px';
//		document.getElementById('shade_info_box_1').style.background = '#' + bground;
		
		$('#shade_layer').fadeTo(0,.80);
		
	}
	else if(info_to_view == "html")
	{
		var information = 	"<div style='width: 54px; height: 30px; padding-top: 10px; float: right;'><a onclick=shade_layer('none','0','0','FFFFFF','0','0','0'); class=a_link>Close <img src='images/icon-delete.png' width=11 height=11 border=0></a></div><div style='clear: both;'></div>";
		information += 		"<div style='width: 520px; height: 40px;' padding: 10px;>" + image_id + "</div>";
		scroll(0, 0);

		document.getElementById('shade_info_box_1').innerHTML = information;
		document.getElementById('shade_holder').style.display = 'block';
		document.getElementById('shade_layer').style.display = 'block';
		document.getElementById('shade_info_holder').style.display = 'block';
		document.getElementById('shade_info_box_1').style.display = 'block';
		document.getElementById('shade_info_box_1').style.width = width_of_box + 'px';
		document.getElementById('shade_info_box_1').style.height = height_of_box + 'px';
//		document.getElementById('shade_info_box_1').style.background = '#' + bground;
	}
	else
	{
		document.getElementById('shade_info_holder').style.display = 'none';
		document.getElementById('shade_holder').style.display = 'none';
		document.getElementById('shade_layer').style.display = 'none';
		document.getElementById('shade_info_box_1').style.display = 'none';
	}
}


