	function swap_chart(mode,page) {
		var oXML = new XMLHttpRequest();
		var url = '/charts/hp_videos.php?m=' + mode + '&p=' + page;
		oXML.open('GET',url,true);
		oXML.onreadystatechange = function() {
			if (oXML.readyState == 4) {
				document.getElementById('featured_videos_contents').innerHTML = oXML.responseText;
			}
		}
		oXML.send(null);
	}
	function suggest() {
		var sOut = '<div class="popup_contents"><div class="popup_close"><a href="#" onClick="hide_box(\'popup\');return false;">X</a></div><div class="popup_hdr">Suggest a Link</div><form id="suggest_form"><div class="signin_row"><div class="signin_text">Site Name:</div><input type="text" name="title" id="suggest_title" class="signin_textbox"/></div><div class="signin_row"><div class="signin_text">Link:</div><input type="text" name="url" class="signin_textbox" value="http://" onFocus="if (this.value == \'http://\') this.value = \'\';"/></div><div class="signin_row"><div class="signin_text"></div><div class="generic_btn generic_btn_left"><a href="#" onClick="add_suggestion(document.getElementById(\'suggest_form\'));return false;">Suggest</a></div><div class="generic_btn generic_btn_left"><a href="#" onClick="hide_box(\'popup\');return false;">Cancel</a></div><div class="clear"></div></form></div></div>';
		display_box(sOut,true);
		if (document.getElementById('suggest_title'))
			document.getElementById('suggest_title').focus();
	}
	function add_suggestion(frm) {
		var oXML = new XMLHttpRequest();
		var url = '/process/suggest_link.php?t=' + frm.title.value + '&u=' + frm.url.value;
		oXML.open('GET',url,true);
		oXML.onreadystatechange = function() {
			if (oXML.readyState == 4) {
				if (oXML.responseText == '<OK/>') {
					document.getElementById('suggest_form').innerHTML = 'Your link has been sent to our editors for review.<br/><br/><div class="generic_btn generic_btn_left"><a href="#" onClick="hide_box(\'popup\');return false;">OK</a></div><div class="clear"></div>';
				} else if (oXML.responseText == '<LOGOUT/>') {
					hide_box('popup');
					signout();
				} else {
					document.getElementById('suggest_form').innerHTML = 'We appear to be having some technical problems.<br/>Please try again in a few minutes.<br/><br/><div class="generic_btn generic_btn_left"><a href="#" onClick="hide_box(\'popup\');return false;">OK</a></div><div class="clear"></div>';
				}
			}
		}
		oXML.send(null);
	}

