function confirmSubmit()
{
	if (window.comments.subject.value== "")
	{
	    alert("please input subject!");
	    agree = false;
	}
        else if (window.comments.email.value == "")
	{
	    var agree = confirm("Continue without email?\nThe e-mail address is required if you are expecting a feedback!")
	}
	else
	{
	    agree=true;
	}
	return agree;
}
function clear_textbox()
{
	if (document.comments.recipient.value == "Provide the name, if known")
	{
		document.comments.recipient.value = "";
		document.comments.recipient.focus();
	}
		
}
function setfocus()
{
	document.comments.subject.focus();
}

 var agt=navigator.userAgent.toLowerCase();

    // *** BROWSER VERSION ***
    // Note: On IE5, these return 4, so use is_ie5up to detect IE5.
    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);


var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie3    = (is_ie && (is_major < 4));
    var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
    var is_ie4up  = (is_ie && (is_major >= 4));
    var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
    var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
    var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
    var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);

function redirect(form,formName)
{
   var url=eval('form.'+formName+'.options[form.'+formName+'.selectedIndex].value');
   if(url!="")
   {
    location.href=url;
    return false;
   }
}
function SendFeedback()
{
	 //alert(document.feedback);
   fLoc = 'http://www.kitco.com/scripts/survey/main_comments_base.pl?type=' + escape(document.feedback.type.value) + '&comment=' + escape(document.feedback.comment.value);
   document.feedback.comment.value = '';
   document.feedback.type.value = 0;
   fPopUp = window.open(fLoc,'FeedbackThankYou','top=50,left=200,width=300,height=200,channelmode=0,dependant=1,fullscreen=0,resizable=no,toolbar=0,status=0,scrollbars=1,location=0,menubar=0,directories=0');
}

function SendFeedback(form)
{
	 //alert(form);
   fLoc = 'http://www.kitco.com/scripts/survey/main_comments_base.pl?type=' + escape(form.type.value) + '&comment=' + escape(form.comment.value);
   form.comment.value = '';
   form.type.value = 0;
   fPopUp = window.open(fLoc,'FeedbackThankYou','top=50,left=200,width=300,height=200,channelmode=0,dependant=1,fullscreen=0,resizable=no,toolbar=0,status=0,scrollbars=1,location=0,menubar=0,directories=0');
}

function NewWindow(HtmlName,WinName,ToolOptions)
{
var w = window.open(HtmlName,WinName,ToolOptions);
w.focus();
}

var bookmarkurl="http://www.kitcometals.com";
var bookmarktitle="Kitco - Base Metals";
function addbookmark()
{
if (document.all)
  window.external.AddFavorite(bookmarkurl, bookmarktitle);
}
