//Function to jump to another forum
function ForumJump(URL) {
	
	if (URL.options[URL.selectedIndex].value != "") self.location.href = URL.options[URL.selectedIndex].value;	
	return true;
}

//Function to change to another forum skin
function SkinChange(URL) {
	
	if (URL.options[URL.selectedIndex].value != "") self.location.href = URL.options[URL.selectedIndex].value;	
	return true;
}

//Function to open pop up window
function openWin(theURL,winName,features) {
  	window.open(theURL,winName,features);
}


//Function to open preview post window
function OpenPreviewWindow(targetPage, formName){
	
	now = new Date  
	
	//Open the window first 	
   	openWin('','preview','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=680,height=400')
   		
   	//Now submit form to the new window
   	formName.action = targetPage + "?ID=" + now.getTime();	
	formName.target = "preview";
	formName.submit();
}

//Function show and hide column boxes
function showhide(id, imgPath) {

	var objBox = document.getElementById(id)
	var objImage = document.getElementById(id + '_image')

	if (document.getElementById(id).style.display == "") {
		objBox.style.display = "none";
		objImage.src = imgPath + "plus.gif";


		SaveCookie(id, 'Hide');
	}
	else {
		objBox.style.display = "";
		objImage.src = imgPath + "minus.gif";



		SaveCookie(id, 'Show');
	}
}

//Function save cookie
function SaveCookie(name, value)
{
	var expiry = new Date();
	expiry.setTime (expiry.getTime() + (24 * 60 * 60 * 1000*365));

	document.cookie=name + "=" + escape(value) + "; expires=" + expiry;
}
