<!--

function hide_text(lmnt,txt)
{
	if(lmnt.value == txt)
	{
		lmnt.value = "";
		lmnt.focus();
	}
}

function show_text(lmnt,txt)
{
	if(lmnt.value == "")
	{
		lmnt.value = txt;
	}
}

function gotoURL()
{
	if(document.tpcs.sel_topic[document.tpcs.sel_topic.selectedIndex].value != "")
	{
		window.location = document.tpcs.sel_topic[document.tpcs.sel_topic.selectedIndex].value;
	}
}

function gotoArticle()
{
	if(document.browse_articles.articles[document.browse_articles.articles.selectedIndex].value != "")
	{
		window.location = document.browse_articles.articles[document.browse_articles.articles.selectedIndex].value;
	}
}

function gotoTopic()
{
	if(document.select_topic.sel_topic[document.select_topic.sel_topic.selectedIndex].value != "")
	{
		window.location = document.select_topic.sel_topic[document.select_topic.sel_topic.selectedIndex].value;
	}
}

function insert_price()
{
	if(document.order_prod.price[document.order_prod.price.selectedIndex].value != "")
	{
		if(document.order_prod.price[document.order_prod.price.selectedIndex].text == "Preview")
		{
			document.getElementById('the_price').innerHTML = document.order_prod.price[document.order_prod.price.selectedIndex].value;
		}
		else
		{
			document.getElementById('the_price').innerHTML = "$" + document.order_prod.price[document.order_prod.price.selectedIndex].value;
			document.order_prod.option_prduct_type.value = document.order_prod.price[document.order_prod.price.selectedIndex].text;
		}
	}
	else
	{
		document.getElementById('the_price').innerHTML = "";
	}
}

// Form validator function

function form_validator(theForm)
{
	if (theForm.price[theForm.price.selectedIndex].value == "")
	{
		alert("Please choose pricing.");
		return (false);
	}
}

function openAnyWindow(url, name) {
  var l = openAnyWindow.arguments.length;
  var w = "";
  var h = "";
  var features = "";

  for (i=2; i<l; i++) {
    var param = openAnyWindow.arguments[i];
    if ( (parseInt(param) == 0) || (isNaN(parseInt(param))) ) {
      features += param + ',';
    } else {
      (w == "") ? w = "width=" + param + "," :
        h = "height=" + param;
    }
  }

  features += w + h;
  var code = "popupWin = window.open(url, name";
  if (l > 2) code += ", '" + features;
  code += "')";
  eval(code);
}

//-->
