// JavaScript Document
/*===BEGIN:AJAX Loader===*/
function getXmlHttpObject(){
  var xmlHttp=null;
	try{	// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch(e){
		// Internet Explorer
		try{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e){
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttp;
}
function GetXmlHttpObject(){
	getXmlHttpObject();
}
/*===END:AJAX Loader===*/

function NewWindow(mypage,myname,w,h,scroll){
 newWindow(mypage,myname,w,h,scroll);
}
function newWindow(mypage,myname,w,h,scroll){
  var win= null;
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  var settings  ='height='+h+',';
      settings +='width='+w+',';
      settings +='top='+wint+',';
      settings +='left='+winl+',';
      settings +='scrollbars='+scroll+',';
      settings +='resizable=yes';
  win=window.open(mypage,myname,settings);
  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}
function emailToFriend(referer,product_id){
	var ref_id = "";
	if(product_id) ref_id = product_id;
	var strURL = "http://australia.shopsafe.com.au/services/emailafriend.asp?referer="+referer+"&ref_id="+ref_id;
	newWindow(strURL,'SendEmail',600,500,'yes');
}
function emailToFriendAU(){
	var referer = location.href;
	var strURL = "http://australia.shopsafe.com.au/emailafriendau.asp?referer="+referer;
	newWindow(strURL,'SendEmail',600,500,'yes');
}
