
// Version 1.0
// 11/24/2003
//
//


//GEneric Window Opener
// hide from JavaScript-challenged browsers
//OpenWindow("Http://www.yahoo.com","400","500")


window.name = "Main";

function OpenWindow(Local, width, height) {
window.name = "Main";
if (width == null && height == null) {
width = '400'
height = '130'
}
var url = ""+ Local + ''
popupWin = window.open(url, 'LittleWindow', 'dependent,width=' + width + ',height=' + height + ',left=50,top=50,scrollbars=1,resizable=1')
}



function ShowHelp(Local, width, height) {
window.name = "Main";
if (width == null && height == null) {
width = '500'
height = '300'
}
var url = '/Directions/' + Local + ''
popupWin = window.open(url, 'HelpWindow', 'dependent,width=' + width + ',height=' + height + ',left=50,top=50,scrollbars=1,resizable=1')
}


var checkflag = "false";
function check(field) {

if (checkflag == "false") {
for (i = 0; i < field.length; i++) {
field[i].checked = true;}
checkflag = "true";
return "Uncheck All"; }
else {
for (i = 0; i < field.length; i++) {
field[i].checked = false; }
checkflag = "false";
return "Check All"; }
}

function checkAll(checkname, exby) {
  for (i = 0; i < checkname.length; i++)
  checkname[i].checked = exby.checked? true:false
}











//<a href="#" onClick="printpage(); return false">Print Me!</a>
function printpage() {
	if (window.print) {
		window.print();
	} else {
		alert('To print this page, select Print from the file menu.');
	}
}




function disableButton(theButton)
{
 theButton.value="Processing...";
 theButton.disabled = true;
 //theButton.form.submit();
  return true; 
}




function CloseWin() {
if (this && !this.closed)  {
	setTimeout("this.close()",1500)
	}// close small window and depart
window.opener.location.reload();
}







  function ConfirmDelete(url)
  {
    if (confirm("Are you sure you want to delete this item?"))
    {
      document.location = url;
    }
  }

  
    function ConfirmClick(url, message)
  {
    if (confirm(message))
    {
      document.location = url;
    }
  }
  
  
    function PeerNoteAlert()
  {
    if (confirm("You Currently Have New PeerNotes Waiting For You. Would You Like To Read Them?"))
    {
      document.location = "MyPage/PeerNotes/index.html";
    }
  }
  



    function fnShowHide( uid )
    {
		var o = document.getElementById( uid );
		
		if( o.style.display == "none" )
		{
			o.style.display = "";
	//	el = document.getElementById('more' + uid);
	//	el.innerHTML = '-';
			
		}
		else
		{
			o.style.display = "none";
		//el = document.getElementById('more' + uid);
		//el.innerHTML = '+';
		}
		return;
    }



function link_prefill()
{
    // see http://www.thesitewizard.com/archive/navigation.shtml
    // for an explanation of this script and how to use it on your
    // own site

    newurl = document.getElementById('link').value;
    listid = document.getElementById('listid').value;

    var baseurl = "http://www.hotgiftcards.net/showlist.php?listid=" +  listid + "&link=" + newurl;
    
    //selecteditem = menuform.newurl.selectedIndex ;
   //newurl = document.getElementById('link').value;
    if (newurl.length != 0) {
      location.href = baseurl;
    }
}



