function ajaxpage(url, containerid, loadingimage,postReceive){
	if($(containerid)){	
	var loadstatustext="<table width='100%' height='100%'><tr><td align='center' valign='top'><img src='../it.oandsi.ecomm.ecommerce/scripts/"+loadingimage+"' /></td></tr></table>";
	var reqObj= new Request.DynHTML({
		'url':url,
		'method':'get',
		'update':$(containerid)
	});
	if(!Browser.Engine.trident)
		$(containerid).innerHTML=loadstatustext;
	reqObj.addEvent("success",function (){
		if (postReceive) {
			$exec(postReceive);
		}
	});
	reqObj.send();
	}
}
	
function smoothpage(url, containerid, loadingimage,postReceive){
	loadstatustext="<div style='width: 100%; margin-top:175px; text-align:center;'><img src='../it.oandsi.ecomm.ecommerce/scripts/"+loadingimage+"' /></div>";
	var reqObj= new Request.DynHTML({
		'url':url,
		'method':'get'
	});
	$(containerid).set('html',loadstatustext);
	reqObj.addEvent("success",function (responseTree, responseElements, responseHTML, responseJavaScript){
		$(containerid).fade("out");
		anon.delay(1000,$(containerid),responseHTML);
		if (postReceive) {
			$exec(postReceive);
		}
	});
	reqObj.send();
}
function iframepage(url, containerid, loadingimage , postReceive){
	loadstatustext="<div style='width: 100%; margin-top:50px; text-align:center;'><img src='../it.oandsi.ecomm.ecommerce/scripts/"+loadingimage+"' /></div>";
	var iframe = new Element('iframe');
	iframe.setStyle("display","none");
	$(containerid).set('html',loadstatustext);
	iframe.container=$(containerid);
	iframe.src=url;
	iframe.container.grab(iframe);
	iframe.addEvent('load', function () {
		this.container.getElement('div').dispose();
		this.setStyle("display", "block");
		$exec(postReceive);
	});
}
function anon(el){
	this.set('html', "");
	this.set('html', el);
	this.fade("in");
}
