/* Open a document in a new window.*/
function opendoc(doctoopen,winwidth,winheight,wintoolbar)
{
  var awindow;
  var winstyle;
  //if popup window needs a toolbar
  if (wintoolbar == 'True')
  {
  	winstyle = "toolbar=yes,width=" + winwidth + ",height=" + winheight + ",resize=no,menubar=yes,status=yes,scrollbars=yes";
  }
  else
  {
  	winstyle = "width=" + winwidth + ",height=" + winheight;
  }
  awindow=window.open(doctoopen, 'theWindow', winstyle);
}
function changeHeardAbout()
{	
	var sel = getElement("wizfrm_HeardAboutUs");
	if (sel == null) return;
	if (sel.options[sel.selectedIndex].value == "4" || sel.options[sel.selectedIndex].value == "5")
		getElement("heardother").style.display = "block";
	else
		getElement("heardother").style.display = "none";
}
function changeMailIn()
{	
	var sel = getElement("wizfrm_HasMailInAttachments_0");
	if (sel == null) return;
	getElement("mailin").style.display = (sel.checked) ? "block" : "none";
}
function showHideDiv(div, flag)
{
	var element = document.getElementById(div);
	if (element == null) return;
	if (flag)
		element.style.display="none";
	else
		element.style.display="block";
}
function helpwin(hid)
{
window.open('help.aspx?hid=' + hid,'bellhelp','width=500,height=400,menubar=no,toolbar=no,location=no,titlebar=yes,scrollbars=yes');
}
function mailwin(a,b)
{
	window.open('mail.aspx?a=' + a + "&em=" + b,'bellmail','width=720,height=680,menubar=yes,toolbar=yes,location=no,titlebar=yes,scrollbars=yes');
}
function uploadfile(appid, typeid)
{
	window.open("UploadForm.aspx?appid=" + appid + "&typeid=" + typeid, "", "menubar=no,toolbar=no,location=no,titlebar=no,height=500, width=580");
}
function editfile(fileid)
{
	window.open("UploadForm.aspx?fileid=" + fileid, "", "menubar=no,toolbar=no,location=no,titlebar=no,height=500,width=580");
}

// Universal "GetElementByID" function
function getElement(id) {
return document.getElementById ? document.getElementById(id) :
document.all ? document.all(id) : null;
}


//function openprintwin()
//{
//window.open('Bellagio_print.aspx','printervers','width=700,height=600,menubar=yes,toolbar=yes,location=no,titlebar=yes,scrollbars=yes');
//}
