if (typeof Meebo == 'undefined') {
	Meebo=function(){(Meebo._=Meebo._||[]).push(arguments)};
	(function(_){var d=document,b=d.body,c;if(!b){c=arguments.callee;
	return setTimeout(function(){c(_)},100)}var a='appendChild',c='createElement',
	m=b.insertBefore(d[c]('div'),b.firstChild),n=m[a](d[c]('m')),i=d[c]('iframe');
	m.style.display='none';m.id='meebo';i.frameBorder="0";n[a](i).id="meebo-iframe";
	function s(){return['<body onload=\'var d=document;d.getElementsByTagName("head")[0].',
	a,'(d.',c,'("script")).src="http',_.https?'s':'','://',_.stage?'stage-':'',
	'cim.meebo.com','/cim?iv=2&network=',_.network,_.lang?'&lang='+_.lang:'',
	_.d?'&domain='+_.d:'','"\'></bo','dy>'].join('')}try{
	d=i.contentWindow.document.open();d.write(s());d.close()}catch(e){
	_.d=d.domain;i.src='javascript:d=document.open();d.write("'+s().replace(/"/g,'\\"')+'");d.close();'}})
    ({ network: 'saintmaryofthewoodscollege_bu32le', stage: false });     
}

function addButton(type) {
	switch(type) {
		case "apply":
			Meebo('addButton', {
				id: "button1", 
				type: "action", 
				icon: "/themes/smwc_v3/images/icons/accept.png",
				label: "Apply Online", 
				onClick: function(){ alert("Hello World."); } 
			});
		break;
		case "requestinfo":
			Meebo('addButton', {
				id: "button2", 
				type: "menu", 
				icon: "/themes/smwc_v3/images/icons/information.png",
				label: "Request Information",
				items: [
					{value: 1, text: "Campus Program", icon: "/images/1.gif"},
					{value: 2, text: "Distance Programs", icon: "/images/2.gif"},
					{value: 3, text: "Graduate Programs", icon: "/images/3.gif"}, 
				],
				onSelect: function(value){ 
					alert("You selected menu item #" + value); 
				} 
			});
		break;
		case "admissionchat":
			Meebo('addButton', {
				id: "button3", 
				type: "widget", 
				icon: "/themes/smwc_v3/images/icons/comment.png",
				label: "Chat with Admissions",
				width: 260,
				height: 318,
				onCreate: function(widget, element){ 
					widget.square = document.createElement('div');
					widget.square.innerHTML = '<object width="250" height="300" ><param name="movie" value="http://widget.meebo.com/mm.swf?EUttvemAqg"/><embed src="http://widget.meebo.com/mm.swf?EUttvemAqg" type="application/x-shockwave-flash" width="250" height="300"></embed></object>';
					widget.square.style.margin = "5px";
					element.appendChild(widget.square);
				} 
			});
		break;
		default:		
		break;
	}
}
