
// close form with
// hideAjaxEmailForm() {
	
	
	
function showAjaxForm(iiTitle, iiHtml, showCloseLink) {

	//scroll to the top
	window.scrollTo(0,0);

	if (parseInt(navigator.appVersion)>3) {
	 if (navigator.appName=="Netscape") {
	  winW = window.innerWidth;
	  winH = window.innerHeight;

		winH = document.body.offsetHeight; //this gets the whole page in FF
		//alert(document.body.offsetHeight);	

	 }
	 if (navigator.appName.indexOf("Microsoft")!=-1) {
	  winW = document.body.offsetWidth;
	  winH = document.body.offsetHeight;
	 }
	}

	left = Math.floor(winW/2) - 250;
	if (left <= 0)
		left = 0;


	ajaxDiv = window.document.getElementById("ajaxDivLayer");

	ajaxDiv.style.width = "500px";
	ajaxDiv.style.height = "350px";
	ajaxDiv.style.position = "absolute";
	ajaxDiv.style.top = "200px";
	ajaxDiv.style.left =  left + "px";  //"250px";
	ajaxDiv.style.padding = "10px 10px 10px 10px";
	
	
	
	ajaxDiv.style.zIndex = "50";
	
	ajaxDiv.style.backgroundColor = "#FFFFFF";
	ajaxDiv.style.border = "#CCCCCC 1px solid";

	iHtml = '';

	if (iiTitle != '') {
		iHtml =  iHtml + '<div  style="width:200px; float:left "><b style="font-size:14px; ">' + iiTitle + '</b></div>';
	}
	
	//<div  style="width:200px; float:left "><b style="font-size:14px; ">Send to a Friend</b></div>
	if (showCloseLink == 1) {
		iHtml = iHtml + '<div align="right" style="width:200px; float:right "><a href="#" onClick="hideAjaxEmailForm(); return false;">Close this window</a></div>';
	} else {
		//iHtml = '';
	}
	
	iHtml = iHtml + '<br style="clear:both;" />';
	
	
	iHtml = iHtml + iiHtml;

	//emailType : productReview
	
	
	ajaxDiv.innerHTML = iHtml;
		

	ajaxDiv.style.display = "block";
	ajaxDiv.style.visibility = "visible";

	//alert(screen.width); //screen, not brwoser width
	//alert(winW); //
	
	///////////////

	//hide the ad box (for firefox)
	//window.document.getElementById("sidebar").style.display = "none";
	//window.document.getElementById("sidebar").style.visibility = "hidden";
	
	
		
	aajaxDiv = window.document.getElementById("ajaxDivBlackLayer");
	aajaxDiv.style.width = winW + "px";
	aajaxDiv.style.height = winH + "px";
	aajaxDiv.style.position = "absolute";
	aajaxDiv.style.top = "1px";
	aajaxDiv.style.left = "1px";	
	aajaxDiv.style.zIndex = "30";
	aajaxDiv.style.backgroundColor = "#000000";
	aajaxDiv.style.opacity = "10";

	aajaxDiv.style.display = "block";
	aajaxDiv.style.visibility = "visible";
	
	ovalue = 3;
	aajaxDiv.style.opacity = ovalue/10;
	aajaxDiv.style.filter = 'alpha(opacity=' + ovalue*10 + ')';
	//aajaxDiv.style.overflow = "hidden";


}


function hideAjaxEmailForm() {

	//box
	ajaxDiv.style.display = "none";
	ajaxDiv.style.visibility = "hidden";
	
	//background
	aajaxDiv.style.display = "none";
	aajaxDiv.style.visibility = "hidden";
	
	//show the ad box
	//window.document.getElementById("sidebar").style.display = "block";
	//window.document.getElementById("sidebar").style.visibility = "visible";
}