// website module specific javascript here

function engage_save_link(rrid) {
	url = '/ajproc/savelink?rrid='+rrid;
	modal_centered = new Control.Modal(
		$('modal-centered-anchor'),
		{iframe: true,position: 'absolute',containerClassName: 'popcenter',overlayClassName: 'popcenter',width: 400, height: 250,iframeTemplate: new Template('<iframe src='+url+' width=\'100%\' height=\'100%\' frameborder=\'0\' id=\'#savepopup\'></iframe>')}
		);
	modal_centered.open();
	return false;
}

function engage_save_event(rrid) {
	url = '/ajproc/saveevent?rrid='+rrid;
	modal_centered = new Control.Modal(
		$('modal-centered-anchor'),
		{iframe: true,position: 'absolute',containerClassName: 'popcenter',overlayClassName: 'popcenter',width: 400, height: 250,iframeTemplate: new Template('<iframe src='+url+' width=\'100%\' height=\'100%\' frameborder=\'0\' id=\'#savepopup\'></iframe>')}
		);
	modal_centered.open();
	return false;
}

function engage_save_article(rrid) {
	url = '/ajproc/savearticle?rrid='+rrid;
	modal_centered = new Control.Modal(
		$('modal-centered-anchor'),
		{iframe: true,position: 'absolute',containerClassName: 'popcenter',overlayClassName: 'popcenter',width: 400, height: 250,iframeTemplate: new Template('<iframe src='+url+' width=\'100%\' height=\'100%\' frameborder=\'0\' id=\'#savepopup\'></iframe>')}
		);
	modal_centered.open();
	return false;
}

function removesavedarticles() {
	s8_simple_callbackform('/ajproc/removesavedarticles', 'savedarticleform', 'after_removesavedarticles', 'Removing Articles, Please Wait...', 'centered');		
}
function after_removesavedarticles() {
	s8_modal_center_show('Refreshing Page...');	
	window.location = '/account/secure/managearticles/';
}

function removesavedlinks() {
	s8_simple_callbackform('/ajproc/removesavedlinks', 'savedarticleform', 'after_removesavedlinks', 'Removing Links, Please Wait...', 'centered');		
}
function after_removesavedlinks() {
	s8_modal_center_show('Refreshing Page...');	
	window.location = '/account/secure/managelinks/';
}

function removesavedevents() {
	s8_simple_callbackform('/ajproc/removesavedevents', 'savedarticleform', 'after_removesavedevents', 'Removing events, Please Wait...', 'centered');		
}
function after_removesavedevents() {
	s8_modal_center_show('Refreshing Page...');	
	window.location = '/account/secure/manageevents/';
}

function updateuserinfo() {
	new Ajax.Updater('usercount', '/ajproc/usercount/');
}


