﻿function cancelRequest(){
    history.go(-3);
}

function PrintReceipt(requestId, orderId)
{
	var url= "Print_Receipt.aspx?r=" + requestId + "&o=" + orderId;
	
    newwindow=window.open(url,'name','scrollbars=yes,resizable=yes,menubar=yes,location=no,width=600,height=700,toolbar=no');
    if (window.focus) {newwindow.focus()}
	return false;
}

function ContactWindow(path, directoryId)
{
	var url= path + "/webparts/Resources/ContactForm.aspx?request=" + directoryId;
	
    newwindow=window.open(url,'name','scrollbars=no,resizable=no,menubar=no,location=no,width=400,height=400,toolbar=no');
    if (window.focus) {newwindow.focus()}
	return false;
}


function printPage() {
    window.print();
}

// Trim functions
function trim(stringToTrim) 
{
	return stringToTrim.replace(/^\s+|\s+$/g,"");
}
function ltrim(stringToTrim) 
{
	return stringToTrim.replace(/^\s+/,"");
}
function rtrim(stringToTrim) 
{
	return stringToTrim.replace(/\s+$/,"");
}

// sidebar login
function UserSectionLogin() {
var frm=document.getElementsByTagName("FORM")[0];
  frm.method="POST";
     frm.action=document.getElementById("client").value;
  frm.submit();
}

//enter button fix

