function gGotoURLByConfirm(url,str,showstr)
{
	if (window.confirm(showstr))
	{
		window.location = url + "?" + str
	}
}
function GetFormValue()
{
	if (document.PostMessage.NotifyMe.checked == true)
		document.PostMessage.txtNotify.value = "1"
	else
		document.PostMessage.txtNotify.value = "0"
	document.PostMessage.submit();
}
function openURL(url)
{
	window.open(url,"hp","width=180,height=200,scrollbars=yes,resizable=yes")
}
supported = false;

if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,4) == 2.0) {
	supported = false;
} else { 
	if (document.images) {
		supported = true;
	}
}
function openURLNew(url,param)
{
	window.open(url + "?" + param,"width=180,height=200,scrollbars=yes,resizable=yes")
}

function goToITRC (path) {
	var server;
	server=GetCookie ("HP-ESC-S-HOST");
	if (server==null) { 
		server="itresourcecenter.hp.com";
	}
	if (path == null)
		window.location.href="http://" + server;
	else
		window.location.href="http://" + server + path;
}

function goToMaintainer (path) {
	var server;
	server=GetCookie ("HP-ESC-S-HOST");
	if (server==null) { 
		server="itresourcecenter.hp.com";
	}
	if (path == null)
		window.location.href="http://" + server;
	else
		window.location.href="http://" + server + path;
}

function goToLogin (path) {
	var server;
	server=GetCookie ("HP-ESC-S-HOST");
	if (server==null) { 
		server="itresourcecenter.hp.com";
	}
	window.location.href="http://" + server + path + "?TargetPage=http://forums.itrc.hp.com:80?site=core";
}

function exlink (url, target, window_attrs, confirm_msg)
{
   if (confirm_msg != "") {
       if (confirm (confirm_msg) == false) {
           return false;
       }
   }
   if (target == "") {
       target = "_blank";
   }
   if (target != "_blank") {
       // same window
       window.open(url, target);
   }
   else if (target == "_blank" && window_attrs == "") {
       // new window with no attributes supplied. 
       // open window in porportionally smaller size
       appname = navigator.appName;
       factor = 0.9;
       if (appname == 'Netscape') {
          child_width = window.innerWidth * factor;
          child_height = window.innerHeight * factor;
       }
       else {
          child_width = document.body.clientWidth * factor;
          child_height = document.body.clientHeight * 1.1;
       }

       window.open(url, target, "directories,location,menubar,resizable,scrollbars,status,toolbar,width=" + child_width + ",height=" + child_height);
   }
   else {
       // new window with attributes supplied
       window.open(url, target, "directories,location,menubar,resizable,scrollbars,status,toolbar,width=600,height=500" + window_attrs);
   }

   return false;
}

function same_window(url)
{
   ret = exlink (url, '_self', '', '');
   return ret;
}

function goToTrainer (path) {
	if (path == null)
		window.location.href="http://education.itresourcecenter.hp.com";
	else
		window.location.href="http://education.itresourcecenter.hp.com" + path;
}

function goToPlanner (path) {
	if (path == null)
		window.location.href="http://planner.itrc.hp.com";
	else
		window.location.href="http://planner.itrc.hp.com" + path;
}

function goToForums (path) {
	if (path == null)
		window.location.href="http://forums.itrc.hp.com";
	else
		window.location.href="http://forums.itrc.hp.com" + path;
}

function goToMaintainerEurope (path) {
	if (path == null)
		window.location.href="http://europe.itresourcecenter.hp.com";
	else
		window.location.href="http://europe.itresourcecenter.hp.com" + path;
}

function openwin(){
	window.open("../includes/HPSupportLink.htm","","top=10,left=50,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no, status=no,width=460,height=460")
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

