function send_to_friend() {
	// send to friend url
	$redirect_url = "http://" + location.host + "/a-functions/send/send.php";
    // get current url and escape the url
	$current_url = escape(location.href);
	// Add current url as querustring
	$redirect_url += "?url=" + $current_url;
	// popup send to friend page
	//OLD way - location.replace($redirect_url); 
	open($redirect_url,"sendtofriend","resizable=1,toolbar=0,location=0,menubar=0,status=0,width=700,height=650");
} // send_to_friend

function send_ask_question() {
	// send to friend url
	$redirect_url = "http://" + location.host + "/a-functions/ask/ask.php";
    // get current url and escape the url
	$current_url = escape(location.href);
	// Add current url as querustring
	$redirect_url += "?url=" + $current_url;
	// popup send to friend page
	//OLD way - location.replace($redirect_url); 
	open($redirect_url,"sendaskquestion","resizable=1,toolbar=0,location=0,menubar=0,status=0,width=700,height=650");
} // send_ask_question

function send_discuss_topic() {
	// send to friend url
	$redirect_url = "http://" + location.host + "/a-functions/discuss/discuss.php";
    // get current url and escape the url
	$current_url = escape(location.href);
	// Add current url as querustring
	$redirect_url += "?url=" + $current_url;
	// popup send to friend page
	//OLD way - location.replace($redirect_url); 
	open($redirect_url,"senddiscusstopic","resizable=1,toolbar=0,location=0,menubar=0,status=0,width=700,height=650");
} // send_discuss_topic

function send_attachment($file) {	
	// send to friend url
	$redirect_url = "http://" + location.host + "/a-functions/sendattach/sendatt.php";
    // escape the attachment Name	
	$file = escape($file);
	// Add current url as querustring
	$redirect_url += "?file=" + $file;
	// popup send to friend page
	//OLD way - location.replace($redirect_url); 
	open($redirect_url,"sendtofriendattachment","resizable=1,toolbar=0,location=0,menubar=0,status=0,width=700,height=650");
} // send_attachment