function clearMessage(msgArea){
	if ( msgArea.value == 'Please Enter Your Message' ){
		msgArea.value = '';
	}
}
function setMessage(msgArea){
	if (msgArea.value == ''){
		msgArea.value = 'Please Enter Your Message';
	}
}


function clearName(txtName){
	if ( txtName.value == 'Full Name (Surname First)' ){
		txtName.value = '';
	}
}
function setName(txtName){
	if (txtName.value == ''){
		txtName.value = 'Full Name (Surname First)';
	}
}


function clearPhone(txtName){
	if ( txtName.value == 'Contact Phones' ){
		txtName.value = '';
	}
}
function setPhone(txtName){
	if (txtName.value == ''){
		txtName.value = 'Contact Phones';
	}
}

function clearEmail(txtEmail){
	if ( txtEmail.value == 'Email' ){
		txtEmail.value = '';
	}
}
function setEmail(txtEmail){
	if (txtEmail.value == ''){
		txtEmail.value = 'Email';
	}
}

function clearCompany(txtCompany){
	if ( txtCompany.value == 'Company Name (Optional)' ){
		txtCompany.value = '';
	}
}
function setCompany(txtCompany){
	if (txtCompany.value == ''){
		txtCompany.value = 'Company Name (Optional)';
	}
}

function clearJobTitle(txtField){
	if ( txtField.value == 'Job Title (Optional)' ){
		txtField.value = '';
	}
}
function setJobTitle(txtField){
	if (txtField.value == ''){
		txtField.value = 'Job Title (Optional)';
	}
}


function clearSearch(txt){
	if (txt.value == 'Search...' ){
		txt.value = '';
	}
}
function setSearch(txt){
	if (txt.value == ''){
		txt.value = 'Search...';
	}
}

var popupWin
 var wholeWin
  function printPage(elementId)  // write corresponding content to the popup window
  {
		
	try{
	   try {
			popupWin.close();
	   }catch(e){

	   }
	    elementContent = document.getElementById(elementId).innerHTML;
	   
	   popupWin = window.open("", "puWin",  "width=800,height=600,scrollbars,dependent,resizable");
	   
	   popupWin.document.open("text/html", "replace"); 
	   popupWin.document.write(htmlOpener);
	   
	   elementContent = document.getElementById(elementId).innerHTML;
	   urlDetails  ='Page: '+location.href;
	   popupWin.document.write(elementContent);
	   popupWin.document.write(urlDetails);
	   
	   popupWin.document.write(htmlCloser);
	   
	   popupWin.document.close();  // close layout stream
	   popupWin.focus();  // bring the popup window to the front
	}catch(e){
	
	}
  }
 
  function closeDep() {
  if (popupWin && popupWin.open && !popupWin.closed) popupWin.close();
  if (wholeWin && wholeWin.open && !wholeWin.closed) wholeWin.close();

  }
