<!--

var menuids=["navlist"]

function buildsubmenus_horizontal(){
for (var i=0; i<menuids.length; i++){
  var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
    for (var t=0; t<ultags.length; t++){
		if (ultags[t].parentNode.parentNode.id==menuids[i]){ //if this is a first level submenu
			ultags[t].style.top=ultags[t].parentNode.offsetHeight+"px" //dynamically position first level submenus to be height of main menu item
		}
		else{ //else if this is a sub level menu (ul)
		  ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it
		}
    ultags[t].parentNode.onmouseover=function(){

	this.getElementsByTagName("ul")[0].style.visibility="visible";
	if(document.getElementById("vidplayer") != null)
	{
	    document.getElementById("vidplayer").style.visibility="hidden";
	    document.getElementById("vidfreeze").style.backgroundImage = "url(http://www.fquick.com/styles/oem/fqv_hidden.jpg)";
	}

	if(document.getElementById("formdiv") != null)
	{
	    document.getElementById("formdiv").style.visibility="hidden";
	}
		if(document.getElementById("sortby") != null)
			{ document.getElementById("sortby").style.visibility="hidden"; }
    }

    ultags[t].parentNode.onmouseout=function(){
        this.getElementsByTagName("ul")[0].style.visibility="hidden";
	if(document.getElementById("vidplayer") != null)
	{
	    document.getElementById("vidplayer").style.visibility="visible"; 
	}

	if(document.getElementById("formdiv") != null)
	{
	    document.getElementById("formdiv").style.visibility="visible"; 
	}

		if(document.getElementById("sortby") != null)
			{ document.getElementById("sortby").style.visibility="visible"; }
    }

    }
  }
}

//if (window.addEventListener)
//window.addEventListener("load", buildsubmenus_horizontal, false)
//else if (window.attachEvent)
//window.attachEvent("onload", buildsubmenus_horizontal)

//function jumpto(x){
//if (document.searchform.search.value != "advanced") {
//	return false;
//	}
//else if(document.searchform.search.value = "advanced"){
//	document.location.href = "http://www.fquick.com/advsearch.php";
//	}
//}

function insertimg()
{
  var path = prompt('Please enter the URL of the image you want to insert:');
  insertAtCursor(document.getElementById('message'), ' [IMG]' + path + '[/IMG] ');
  document.postcomment.message.focus();
  return false ;
}

function inserturl()
{
  var url = prompt('Please enter the URL of the website link you want to insert:');
  var link = prompt('Now enter the words you want to activate this link:');
  insertAtCursor(document.getElementById('message'), ' [URL="' + url + '"]' + link + '[/URL] ');
  document.postcomment.message.focus();
  return false ;
}


function largerThan(a,b)
{
	return a>b;
}

function checksearch ( form )
{
if (form.keyword.value.length < 3) {
    alert( "Please enter a search query that is 3 or more characters." );
    form.keyword.focus();
    return false;
}
}

var checkflag = "false";

function checkUncheckAll(f){

	if (checkflag == "false") {

		for (i=0; i < f.length; i++) 
		{
			f[i].checked = true;
		}

		f.checked = true;
		checkflag = "true";

	}else {

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

		f.checked = false;
		checkflag = "false";

	}

}


function toggleLayer(whichLayer)
	{
		if (document.getElementById)
	{
	// this is the way the standards work
		var style2 = document.getElementById(whichLayer).style;
		style2.display = style2.display? "":"block";
	}
	else if (document.all)
	{
	// this is the way old msie versions work
	var style2 = document.all[whichLayer].style;
	style2.display = style2.display? "":"block";
	}	
	else if (document.layers)
	{
	// this is the way nn4 works
	var style2 = document.layers[whichLayer].style;
	style2.display = style2.display? "":"block";
	}
	}

function popwin(url)
{
	newwindow = window.open(url,'Fquick.com: Print Article','height=550,width=500,toolbar=yes,menubar=yes,location=no,status=yes,resizable=yes');
	if (window.focus) { newwindow.focus(); }
}



/* popup image */

var popbackground="white" //specify backcolor or background image for pop window
var windowtitle="FQuick.com - View Image Popup Window"  //pop window title

function detectexist(obj){
return (typeof obj !="undefined")
}

function cipopup(imgpath, popwidth, popheight, textdescription){

function getpos(){
leftpos=(detectexist(window.screenLeft))? screenLeft+document.body.clientWidth/2-popwidth/2 : detectexist(window.screenX)? screenX+innerWidth/2-popwidth/2 : 0
toppos=(detectexist(window.screenTop))? screenTop+document.body.clientHeight/2-popheight/2 : detectexist(window.screenY)? screenY+innerHeight/2-popheight/2 : 0
if (window.opera){
leftpos-=screenLeft
toppos-=screenTop
}
}

getpos()
var winattributes='width='+popwidth+',height='+popheight+',resizable=no,scrollbars=no,left='+leftpos+',top='+toppos
var bodyattribute=(popbackground.indexOf(".")!=-1)? 'background="'+popbackground+'"' : 'bgcolor="'+popbackground+'"'
if (typeof jkpopwin=="undefined" || jkpopwin.closed)
jkpopwin=window.open("","",winattributes)
else{
//getpos() //uncomment these 2 lines if you wish subsequent popups to be centered too
//jkpopwin.moveTo(leftpos, toppos)
jkpopwin.resizeTo(popwidth, popheight+30)
}
jkpopwin.document.open()
jkpopwin.document.write('<head><title>FQuick Image</title><META HTTP-EQUIV="REFRESH" CONTENT="0; URL='+imgpath+'"></head><body>Please wait....</body></html>')
jkpopwin.document.close()
jkpopwin.focus()
}

/* popup image end */

/* site preload */

var myimages = new Array();
function preloading(){
for (x=0; x<preloading.arguments.length; x++){
myimages[x] = new Image();
myimages[x].src = preloading.arguments[x];
}
}
preloading("http://www.fquick.com/styles/oem/gradient_blue.jpg","http://www.fquick.com/styles/oem/gradient_blue_flip.jpg");

/* site preload end */


/* combobox image flip */

function showimage()

{
if (!document.images)
return
document.images.pictures.src=
document.register.avatar.options[document.register.avatar.selectedIndex].value
}

/* combobox image flip end */

function confirmSubmit() 
{
	var agree=confirm("Are you sure you want to delete this?");
	if (agree)
	return true ;
	else
	return false ;
}

function confirmReset() 
{
	var agree=confirm("Are you sure you want to reset this?");
	if (agree)
	return true ;
	else
	return false ;
}


function insertAtCursor(myField, myValue) {
//IE support
if (document.selection) {
myField.focus();
sel = document.selection.createRange();
sel.text = myValue;
}
//MOZILLA/NETSCAPE support
else if (myField.selectionStart || myField.selectionStart == '0') {
var startPos = myField.selectionStart;
var endPos = myField.selectionEnd;
myField.value = myField.value.substring(0, startPos)
+ myValue
+ myField.value.substring(endPos, myField.value.length);
} else {
myField.value += myValue;
}
}

/* hide show div */

function HideContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "block";
}
function ReverseContentDisplay(d) {
if(d.length < 1) { return; }
if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; }
else { document.getElementById(d).style.display = "none"; }
}


//-->
    
