function Jump_Box(request_uri,targ,selObj,restore){
	if(selObj.options[selObj.selectedIndex].value != -1){
		self.location.href = request_uri+selObj.options[selObj.selectedIndex].value+"";
		if(restore) selObj.selectedIndex=0;
	}
}

var B_open = 0;
var I_open = 0;
var U_open = 0;
var URL_open = 0;
var Code_open = 0;
var Quote_open = 0;

function InsertTag(thetag){
	var code_open = eval(thetag+"_open");

	if(code_open == 0){
		eval(thetag+"_open = 1");	
		document.post.message.value += "["+thetag+"]";
		eval("document.post." + thetag + ".value += '*' ");
	}else{
		eval(thetag+"_open = 0");	
		document.post.message.value += "[/"+thetag+"]";
		eval("document.post." + thetag + ".value = ' '+thetag+' ' ");
	}
}

function InsertIMG(){
	document.post.IMG.value = " IMG *";
	IMG = prompt("Enter the web address of the image", "http://");
	
	document.post.IMG.value = " IMG ";
	
	if(IMG && IMG != "http://"){
		document.post.message.value += "[IMG]"+IMG+"[/IMG]";
	}
}

function InsertCOLOR(){
	document.post.color.value = " COLOR *";
	
	COLOR = prompt("Enter code or name color for message\nExample : #0000FF / Example : red,blue,green,black", "#000000");
	MESSAGE = prompt("Enter your message", "");
	
	document.post.color.value = " COLOR ";
	
	if(COLOR && MESSAGE){
		document.post.message.value += "[color="+COLOR+"]"+MESSAGE+"[/color]";
	}
}


function InsertSIZE(){
	document.post.size.value = " SIZE *";
	
	SIZE = prompt("Enter size of message\nExsample : 10", "10");
	MESSAGE = prompt("Enter your message", "");
	
	document.post.size.value = " SIZE ";
	
	if(SIZE && MESSAGE){
		document.post.message.value += "[size="+SIZE+"]"+MESSAGE+"[/size]";
	}
}

function InsertSmiley(code){
	document.post.message.value += ""+code+"";
}