 function doEmailTagInsert(tagValue, target)
 { 
	var TagValue = document.getElementById(tagValue);
	for( var i=0; i < TagValue.options.length; i++ ){
		if (TagValue.options[i].selected){
			if (document.getElementById(target).value == ""){
				document.getElementById(target).value += "["+TagValue.options[i].value+"]";
			} else {
				document.getElementById(target).value += ",["+TagValue.options[i].value+"]";
			}
		}
	}
} 

function clickButton(e, buttonid)
{ 
	var bt = document.getElementById(buttonid); 
	if (typeof bt == 'object')
	{ 
		if(navigator.appName.indexOf("Netscape")>(-1))
		{ 
			if (e.keyCode == 13)
			{ 
				bt.click(); return false; 
			} 
		} 
		if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1))
		{ 
			if (event.keyCode == 13)
			{ bt.click(); return false; } 
		} 
	}
} 

 function doTagInsert(tagValue, target)
 { 
	var TagValue = document.getElementById(tagValue);
	for( var i=0; i < TagValue.options.length; i++ ){
		if (TagValue.options[i].selected){
				document.getElementById(target).value += " ["+TagValue.options[i].value+"] ";
		}
	}
} 

function confirm_Archive()
{
if (confirm("Are you sure you want to archive this campaign?\n\nDoing so will prevent users from taking your survey,\nand you will NOT have any way to reactivate it. However,\nyour reporting will still be available.")==true)
	return true;
else
	return false;
}

function confirm_MassiveDelete()
{
if (confirm("Are you sure you want to delete this campaign?\n\nDoing so will DELETE ALL of the data below it, including \nall of the lists, surveys, questions, and survey\nresponses.\n\nNo reports will be available for this campaign and\nyou will NOT be able to recover any of this data after\nyou delete it.\n\nClick 'OK' to continue.")==true)
	return true;
else
	return false;
}

function confirm_delete()
{
if (confirm("Are you sure you want to delete this item?")==true)
	return true;
else
	return false;
}

function confirm_sendnewsletter()
{
if (confirm("Are you sure you want to send this newsletter?")==true)
	return true;
else
	return false;
}

function confirm_deactivate()
{
if (confirm("Are you sure you want to deactivate this item?")==true)
	return true;
else
	return false;
}

function OpenWin( location )
{

  var ieDHTML = document.all !=null;
  var nsDHTML = document.layers;

  if (ieDHTML) {
    var xWidth = document.body.clientWidth;
    var yHeight = document.body.clientHeight;
  }
  if (nsDHTML) {
    var xWidth = window.innerWidth;
    var yHeight = window.innerHeight;
  }

  if (xWidth >= 1000) {
    xWidth = 800;
  } else if (xWidth >= 800) {
    xWidth = 750;
  } else {
    xWidth = 650;
  }

  if (yHeight >= 1000) {
    yHeight = 900;
  } else if (yHeight >= 750) {
    yHeight = 700;
  } else {
    yHeight = 600;
  }
  if (window.name == "popup") {
    if (ieDHTML) {
      window.open(location, "newPopup",
        "width=" + xWidth +",height=" + yHeight +",toolbar=no,status=no,menubar=no,top=60,left=135,scrollbars=yes,resizable=yes");
    } else {
      window.open(location, 'newPopup',
        'menubar=yes,scrollbars=yes,toolbar=yes,status=yes,width=' + xWidth + ',height=' + yHeight +',top=60,left=135');
    }
  } else {
    if (ieDHTML) {
      window.open(location, "popup",
        "width=" + xWidth +",height=" + yHeight +",toolbar=no,status=no,menubar=no,top=45,left=120,scrollbars=yes,resizable=yes");

    } else {
      window.open(location, 'popup',
        'width=' + xWidth + ',height=' + yHeight +',menubar=no,toolbar=no,scrollbars=no,status=no,top=45,left=120');
    }
  }
}
<!-- Used by the SetDefaultButton Function -->
function fnTrapKD(btn, event)
{
	if (document.all){
		if (event.keyCode == 13){
			event.returnValue=false;
			event.cancel = true;
			btn.click();
		}
	}
	else if (document.getElementById){
		if (event.which == 13){
			event.returnValue=false;
			event.cancel = true;
			btn.click();
		}
	}
	else if(document.layers){
		if(event.which == 13){
			event.returnValue=false;
			event.cancel = true;
			btn.click();
		}
	}
}

