function openContactUs()
{
  //ContactUs=window.open("contactus.aspx","ContactUs","'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=223,height=182'");
  window.location = "contactform.aspx";
}

function openRefund()
{
  Refund=window.open("refund.aspx","Refund","'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=223,height=263'");
}

function screenShot(image, name, width, height)
{
  var attributes = "toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=" + width + ",height=" + height;
  ScreenShot=window.open(image, name, attributes);
}

function writeDate()
{
  days = new Array(7);
  days[0] = "Sunday";
  days[1] = "Monday";
  days[2] = "Tuesday";
  days[3] = "Wednesday";
  days[4] = "Thursday";
  days[5] = "Friday";
  days[6] = "Saturday";
  months = new Array(12);
  months[0] = "January";
  months[1] = "February";
  months[2] = "March";
  months[3] = "April";
  months[4] = "May";
  months[5] = "June";
  months[6] = "July";
  months[7] = "August";
  months[8] = "September";
  months[9] = "October";
  months[10] = "November";
  months[11] = "December";
  today = new Date();
  day = days[today.getDay()];
  month = months[today.getMonth()];
  date = today.getDate();
  year=today.getYear();
  if (year < 2000)
    year = year + 1900;
  document.write (day + ", " + month + " " + date + ", " + year);
}

function SignInPhotoLibrary()
{
  document.cookie = "Photouser=" + document.signin.photouser.value;
  document.cookie = "Photopass=" + document.signin.photopass.value;
  document.location = "photolibrary/index.aspx";
}

function SignInCaseStudies()
{
  document.cookie = "Photouser=" + document.signin.photouser.value;
  document.cookie = "Photopass=" + document.signin.photopass.value;
  document.location = "casestudiesmain.aspx";
}

function checkEnter(e, page)
{

  //e is event object passed from function invocation
  var characterCode; //literal character code will be stored in this variable

  if(e && e.which)
  {

    //if which property of event object is supported (NN4)
    e = e;
    characterCode = e.which; //character code is contained in NN4's which property
  }
  else
  {
    e = event;
    characterCode = e.keyCode; //character code is contained in IE's keyCode property
  }

  if(characterCode == 13)
  {

    //if generated character code is equal to ascii 13 (if enter key)
    if (page == "photolibrary")
    {
      SignInPhotoLibrary();
      return false;
    }
    else if (page == "casestudies")
    {
      SignInCaseStudies();
      return false;
    }
    else
      return false;
  }
  else
  {
    return true;
  }
}


    var layer_ref;
    var temp;
    var state = 'hidden';

	function show(layer_ref)
	{
	  state = 'visible';

	  if (document.all)  //Internet Explorer
	  {
		eval( "document.all." + layer_ref + ".style.visibility = state");
	  }

	  if (document.layers)  //Netscape or Mozilla
	  {
		document.layers[layer_ref].visibility = state;
	  }

	  if (document.getElementById && !document.all)
	  {
		temp = document.getElementById(layer_ref);
		temp.style.visibility = state;
	  }
	}

	function hide(layer_ref)
	{
	  state = 'hidden';

	  if (document.all)  //Internet Explorer
	  {
		eval( "document.all." + layer_ref + ".style.visibility = state");
	  }

	  if (document.layers)  //Netscape or Mozilla
	  {
		document.layers[layer_ref].visibility = state;
	  }

	  if (document.getElementById && !document.all)
	  {
		temp = document.getElementById(layer_ref);
		temp.style.visibility = state;
	  }
	}