// JavaScript Document
var loadedpage=false;
var storednotificationtext="";
aaManageEvent(window,'load',enlargechecker);
function enlargechecker()
{
	loadedpage=true;
	if (storednotificationtext!="") {
		var tmpnul=notificationWindow(storednotificationtext,0,"","enlargenotify");
		storednotificationtext='';
	}
}

function popupenlarge(prodcode,imgnum)
{
	var notificationtext="";
	notificationtext="<div><iframe width='800px' height='500px' frameborder='0' scrolling='no' src='/modules/viewimage_ajax2.asp?prodcode="+prodcode+"&imgnum="+imgnum+"'></iframe></div>";
	if (loadedpage){
		var tmpnul=notificationWindow(notificationtext,0,"","enlargenotify");
	} else { 
		storednotificationtext=notificationtext;
	} 
	if (window.event) event.returnValue = false;
	return false;
}

function popupenlarge_callBack( sString , statusCode , requestObject )
	{
		var prodcode=(requestObject.m_userObject);
//status OK : print the time 
		if( statusCode == ajax_statusCode_ok )
		{
			var addbutton = document.getElementById("enlarge_"+(prodcode));
			addbutton.src = "/images/icons/enlarge.gif";
			var notificationtext="";
			notificationtext="<div>"+sString+"</div>"
			var tmpnul=notificationWindow(notificationtext,0,"","enlargenotify")

		}
//error : print an error message, test this by changing the request URL above to garbage
		else
		{
			var addbutton = document.getElementById("enlarge_"+(prodcode));
			addbutton.src = "/images/highside/loader.gif";
		}
	}

