var slideInUse = new Array();

function toggleit(divid, bdel, badd) { 
if (document.getElementById(divid).style.display == 'none') {
	document.getElementById(divid).style.display = 'block';
	document.getElementById(bdel).style.display = 'block';
	document.getElementById(badd).style.display = 'none';
} else {
	document.getElementById(divid).style.display = 'none';
	document.getElementById(bdel).style.display = 'none';
	document.getElementById(badd).style.display = 'block';
}
}

function toggleitset(divid, bdel, badd) { 
if (document.getElementById(divid).style.display == 'none') {
	document.getElementById(divid).style.display = 'block';
	document.getElementById(bdel).style.visibility = 'visible';
	document.getElementById(badd).style.visibility = 'hidden';
} else {
	document.getElementById(divid).style.display = 'none';
	document.getElementById(bdel).style.visibility = 'hidden';
	document.getElementById(badd).style.visibility = 'visible';
}
}


function toggleit2(divid) { 
	var ids2=new Array('inbox', 'sent', 'compose', 'msg');
	for (var i=0;i<ids2.length;i++){
		document.getElementById(ids2[i]).style.display = 'none';	 
	}
	document.getElementById(divid).style.display = 'block';
}

function Slide(objId, options) {
	this.obj = document.getElementById(objId);
	this.duration = 1;
	this.height = parseInt(this.obj.style.height);

	if(typeof options != 'undefined') { this.options = options; } else { this.options = {}; }
	if(this.options.duration) { this.duration = this.options.duration; }
		
	this.up = function() {
		this.curHeight = this.height;
		this.newHeight = '1';
		if(slideInUse[objId] != true) {
			var finishTime = this.slide();
			window.setTimeout("Slide('"+objId+"').finishup("+this.height+");",finishTime);
		}
	}
	
	this.down = function() {
		this.newHeight = this.height;
		this.curHeight = '1';
		if(slideInUse[objId] != true) {
			this.obj.style.height = '1px';
			this.obj.style.display = 'block';
			this.slide();
		}
	}
	
	this.slide = function() {
		slideInUse[objId] = true;
		var frames = 30 * duration; // Running at 30 fps

		var tIncrement = (duration*1000) / frames;
		tIncrement = Math.round(tIncrement);
		var sIncrement = (this.curHeight-this.newHeight) / frames;

		var frameSizes = new Array();
		for(var i=0; i < frames; i++) {
			if(i < frames/2) {
				frameSizes[i] = (sIncrement * (i/frames))*4;
			} else {
				frameSizes[i] = (sIncrement * (1-(i/frames)))*4;
			}
		}
		
		for(var i=0; i < frames; i++) {
			this.curHeight = this.curHeight - frameSizes[i];
			window.setTimeout("document.getElementById('"+objId+"').style.height='"+Math.round(this.curHeight)+"px';",tIncrement * i);
		}
		
		window.setTimeout("delete(slideInUse['"+objId+"']);",tIncrement * i);
		
		if(this.options.onComplete) {
			window.setTimeout(this.options.onComplete, tIncrement * (i-2));
		}
		
		return tIncrement * i;
	}
	
	this.finishup = function(height) {
		this.obj.style.display = 'none';
		this.obj.style.height = height + 'px';
	}
	
	return this;
}

<!-- Begin
function checkthem(field) {
if (document.pmform.pmcheckall.checked == true || document.pmform2.pmcheckall2.checked == true) {
	checkAll(field);
} else {
	uncheckAll(field);
}
}
function checkAll(field)
{
for (i = 0; i < field.length; i++)
	field[i].checked = true ;
}

function uncheckAll(field)
{
for (i = 0; i < field.length; i++)
	field[i].checked = false ;
}

function contact(newval) {
	document.forms["compform"].elements["tofield"].value = newval;
	//document.compform.tofield.value = newval;
}

//  End -->
function persinfo() {
	if (document.getElementById("persinfo").style.display == 'none') {
		document.getElementById("celldivregl1").style.display = 'block';
		document.getElementById("celldivregb1").style.display = 'block';
		document.getElementById("celldivregl2").style.display = 'block';
		document.getElementById("celldivregb2").style.display = 'block';
		document.getElementById("celldivregl3").style.display = 'block';
		document.getElementById("celldivregb3").style.display = 'block';
		document.getElementById("celldivregl4").style.display = 'block';
		document.getElementById("celldivregb4").style.display = 'block';
		document.getElementById("celldivregl5").style.display = 'block';
		document.getElementById("celldivregb5").style.display = 'block';
		document.getElementById("celldivregl6").style.display = 'block';
		document.getElementById("celldivregb6").style.display = 'block';
		document.getElementById("celldivregl7").style.display = 'block';
		document.getElementById("celldivregb7").style.display = 'block';
		document.getElementById("celldivregl8").style.display = 'block';
		document.getElementById("celldivregb8").style.display = 'block';
		document.getElementById("celldivregl9").style.display = 'block';
		document.getElementById("celldivregb9").style.display = 'block';
		document.getElementById("celldivmcpl1").style.display = 'none';
		document.getElementById("celldivmcpr1").style.display = 'none';
		document.getElementById("celldivmcpl2").style.display = 'none';
		document.getElementById("celldivmcpr2").style.display = 'none';
		document.getElementById("celldivmcpl3").style.display = 'none';
		document.getElementById("celldivmcpr3").style.display = 'none';
		if (document.getElementById("celldivmcpl4")) {
		document.getElementById("celldivmcpl4").style.display = 'none';
		}
		if (document.getElementById("celldivmcpr4")) {
		document.getElementById("celldivmcpr4").style.display = 'none';
		}
		if (document.getElementById("celldivmcpl5")) {
		document.getElementById("celldivmcpl5").style.display = 'none';
		}
		if (document.getElementById("celldivmcpr5")) {
		document.getElementById("celldivmcpr5").style.display = 'none';
		}
		document.getElementById("celldivmcpl6").style.display = 'none';
		document.getElementById("celldivmcpr6").style.display = 'none';
		document.getElementById("persinfo").style.display = 'block'
		document.getElementById("pers").innrHTML = 'View Personal Info';
	} else {
		document.getElementById("celldivregl1").style.display = 'none';
		document.getElementById("celldivregb1").style.display = 'none';
		document.getElementById("celldivregl2").style.display = 'none';
		document.getElementById("celldivregb2").style.display = 'none';
		document.getElementById("celldivregl3").style.display = 'none';
		document.getElementById("celldivregb3").style.display = 'none';
		document.getElementById("celldivregl4").style.display = 'none';
		document.getElementById("celldivregb4").style.display = 'none';
		document.getElementById("celldivregl5").style.display = 'none';
		document.getElementById("celldivregb5").style.display = 'none';
		document.getElementById("celldivregl6").style.display = 'none';
		document.getElementById("celldivregb6").style.display = 'none';
		document.getElementById("celldivregl7").style.display = 'none';
		document.getElementById("celldivregb7").style.display = 'none';
		document.getElementById("celldivregl8").style.display = 'none';
		document.getElementById("celldivregb8").style.display = 'none';
		document.getElementById("celldivregl9").style.display = 'none';
		document.getElementById("celldivregb9").style.display = 'none';
		document.getElementById("celldivmcpl1").style.display = 'block';
		document.getElementById("celldivmcpr1").style.display = 'block';
		document.getElementById("celldivmcpl2").style.display = 'block';
		document.getElementById("celldivmcpr2").style.display = 'block';
		document.getElementById("celldivmcpl3").style.display = 'block';
		document.getElementById("celldivmcpr3").style.display = 'block';
		if (document.getElementById("celldivmcpl4")) {
		document.getElementById("celldivmcpl4").style.display = 'block';
		}
		if (document.getElementById("celldivmcpr4")) {
		document.getElementById("celldivmcpr4").style.display = 'block';
		}
		if (document.getElementById("celldivmcpl5")) {
		document.getElementById("celldivmcpl5").style.display = 'block';
		}
		if (document.getElementById("celldivmcpr5")) {
		document.getElementById("celldivmcpr5").style.display = 'block';
		}
		document.getElementById("celldivmcpl6").style.display = 'block';
		document.getElementById("celldivmcpr6").style.display = 'block';
		document.getElementById("persinfo").style.display = 'none'
		document.getElementById("pers").innrHTML = 'Edit Personal Info';
	}
}



function helpme(myval)
{
	
	if (myval == "close") {
		document.getElementById ('MaskedDiv').style.visibility='hidden';
		document.getElementById ('HelpPanel').style.visibility='hidden';
		document.getElementById ('closehelp').style.visibility='hidden';
	} else {
	//Help function for the settings panel//
	    document.getElementById ('MaskedDiv').style.display='';
        document.getElementById ('MaskedDiv').style.visibility='visible';
        document.getElementById ('MaskedDiv').style.top='0px';
        document.getElementById ('MaskedDiv').style.left='0px';
        document.getElementById ('MaskedDiv').style.width=  document.body.clientWidth + 'px';
        document.getElementById ('MaskedDiv').style.height= document.body.clientHeight+ 'px';

        
        document.getElementById ('HelpPanel').style.visibility='visible';
        document.getElementById ('HelpPanel').style.display='';
        document.getElementById ('HelpPanel').style.width= '350px';
        document.getElementById ('HelpPanel').style.height= '200px';
        document.getElementById ('HelpPanel').style.left=document.body.clientWidth/2-200 + 'px';
		document.getElementById ('HelpPanel').style.top=document.body.clientHeight/2-200 + 'px';
		
		document.getElementById ('closehelp').style.visibility='visible';
		
		if (myval == "search") {
			document.getElementById ('HelpPanelText').innerHTML='With the search word/phrase filter you can enter up to three words or phrases that we will match with the body of a post or the subject line. Use the boolean operators "And/Or" to connect the three search fields.';
		} else if(myval == "timer") {
			document.getElementById ('HelpPanelText').innerHTML='There are three timer settings:<br><br>First - When to start searching. The default setting is to search starting right now all new posts that come in. You can change this setting to search up to the last 72 hours worth of posts. After you click start, however, the timer will adjust to the current time so that you do not get duplicate posts. You may need to re-select your time preference if you change your search terms and still want to search for posts from up to the last 72 hours.<br><br>Second - This is how often the system will search for new posts related to your search criteria. The default is every 30 seconds.<br><br>Third - This is how often the messages will auto rotate on the screen and move from the Queue to the Viewed section. The default is every 20 seconds.<br><br>';
		} else if (myval == "filters") {
			document.getElementById ('HelpPanelText').innerHTML='There are four filter settings:<br><br>First - The word filter uses a list of known words that are less than professional or otherwise obscene in nature. We have attempted to replace these terms with more appropriate words without trying to change the meaning of the text. The higher the setting the more sensitive the search and replace function will be.<br><br>Second - The content filter is designed to restrict posts that may have objectionable material. This filter is primarily based on ratings based on how well we think the forum or message board filters and monitors their own posts. The less they monitor the more likely they will have objectionable material so the more restrictive you set the filter the less objectionable material you will likely see.<br><br>Third/Fourth - Image and Video filters. We have attempted to identify links within the posts and transform them to viable links where the images or videos will either be displayed or not depending on your preferences.<br><br>';
		} else if (myval == "display") {
			document.getElementById ('HelpPanelText').innerHTML='We have included some display options to allow you to format the screen and incoming text according to the options shown. You can adjust the font size and color, and the background color for the posted text area only.';
		} else if (myval == "site") {
			document.getElementById ('HelpPanelText').innerHTML='You can choose to narrow or broaden your search by selecting a specific site to search from. In order to view all new posts from a particular site according to your other filter options, leave the search word/phrase boxes blank.<br><br>Otherwise, you can use this dropdown to narrow your search results to include keywords from within that site only.<br><br>Remember to change the selector back to "Pick a Specific Site..." if you no longer wish to include this as a filter.<br><br>You can only use one or the other of the Keyword Search or Site Search, but not both.<br><br>';
		} else if (myval == "keyword") {
			document.getElementById ('HelpPanelText').innerHTML='Each site that we pull data from has devised certain keywords that are related to their site content. In addition we have added some of our own. You can now narrow or broaden your search to include cross-site categories/keywords.<br><br>By selecting a keyword here in addition to using the word/phrase search, you can narrow your results to only include those from the specific sites whose content may be related to that keyword and that contain your word/phrase.<br><br>By omitting the word/phrase search you can use the keyword search to view all new posts from the different sites who may have content associated with that keyword whether the actual post is relevant or not.<br><br>You can only use one or the other of the Keyword Search or Site Search, but not both.<br><br>';
		} else if (myval == "addforum") {
			document.getElementById ('HelpPanelText').innerHTML='Thank you for your interest in FOMBE. Please fill out at a minimum the Contact Name field and Email field and click Submit. Someone will get with you as soon as we can.<br><br>We feel there is great potential for success when you partner with FOMBE, and you have decided to take that first leap of Faith. We promise you won\'t regret it.<br><br>If there are errors with submitting this form, please contact support @ fombe.com. Thank you, and have a wonderful day.<br><br>';
		} else if (myval == "adid") {
			document.getElementById ('HelpPanelText').innerHTML='Get the AID number from CJ and put it here. This will also be the unique identifier in the database for each company.<br><br>';
		} else if (myval == "adname") {
			document.getElementById ('HelpPanelText').innerHTML='This is the actual name of the company. Many times this name is similar to the dot com name. The name can contain spaces and is not necessarily meant to be the link to the company.<br><br>';
		} else if (myval == "addbanner") {
			document.getElementById ('HelpPanelText').innerHTML='This field is found in the HTML code section from CJ and includes the "<img src - to the />". Basically, you do not include the hyperlink tags or "a" tags.<br><br>';
		} else if (myval == "adlink") {
			document.getElementById ('HelpPanelText').innerHTML='This field is found in the HTML code section from CJ and includes the first link following the "href=". This will be the link that directors our customers to the specific website, but it is coded to go through CJ so that is why you don\'t see the company name in the link.<br><br>';
		} else if (myval == "adurl") {
			document.getElementById ('HelpPanelText').innerHTML='This is just an easy way to try and get a list of keywords for the company so that we don\'t have to. Put the base url here (ie. fombe.com) and click the "Get Keywords" button. It will not work for every company because not every company has placed their keywords like they should on their home page. In that case we have to add our own keywords that describe the business or service or product of that company. See the keywords help for more info about keywords.<br><br>';
		} else if (myval == "adkeywords") {
			document.getElementById ('HelpPanelText').innerHTML='When importing keywords you just need to check over it and make sure that they are formatted correctly (after each word or phrase should be a comma with no extra spaces. Also, we need to make sure that we are not including obscure keywords that really don\'t apply to the business such as prepositions, or other such words that are too generic in nature.<br><br>';
		} else if (myval == "adadd") {
			document.getElementById ('HelpPanelText').innerHTML='All of this information should come from the CJ.com website except for the keywords. Sometimes we can get the keywords we need through this script. At other times we will have to write in our own keywords. These are used in determining which advertiser will be placed with each incoming post. <br><br>When going to the cj.com site, you click on the "By Relationship" tab and this should show all the advertisers that we have signed up with. It would probably be easier to sort by name so that you can easily compare the list to the current advertiser list in the dropdown bar and make sure we aren\'t duplicating companies. If you do you will get an error anyway because each ID must be unique. <br><br>After you find an advertiser to add then click on "View Links" and search for a banner in the 234wx60h range preferably, but if not then a 120x60, and lastly a full banner if they don\'t have either of the first two, but we\'ll have to shrink the full banner so pick one without much in the way of graphics or info other than a company name or something like that. Click on the link and a new window should open. Click on "get HTML" and this should provide the majority of info you need. Good luck!<br><br>';
		}
		
	}
}

function osearchr(myval1, myval2, myval3) 
{
	document.getElementById(myval1).style.visibility='visible';
	document.getElementById(myval2).style.visibility='hidden';
	document.getElementById(myval3).selectedIndex=0;
}