
function popFile(fileName,fileTitle,x,y) {
	var fileType = fileName.substring(fileName.length-3, fileName.length);
	var NN = '/webservices/support/tutorials/'+fileType+'/frame.jsp' + '?' + escape(fileName);
	var MSIE = '/webservices/support/tutorials/'+fileType+'/page.jsp' + '?filesrc=' + fileName + "&filetitle=" + fileTitle + "&width=" + x + "&height=" + y;
	
	if (navigator.appName == 'Netscape' && fileType == 'swf')
	    flashWindow = window.open(NN,'AutomatedTutorial','width=' + x + ',height=' + y);
	else
	    flashWindow = window.open(MSIE,'AutomatedTutorial','width=' + x + ',height=' + y); //  + ',resizable=yes'		
}

function popOut(path,x,y) {
	outWindow = window.open(path,'loanmagicWindow','width=' + x + ',height=' + y + ',resizable=yes');
}

function popAutoTutorial(fileName,fileTitle,x,y) {
	//var fileName  = '/support/tutorials/files/page.jsp';
	//var fileType = fileName.substring(fileName.indexOf(".")+1, fileName.length);
	var fileType = fileName.substring(fileName.length-3, fileName.length);
	var NN = '/webservices/support/tutorials/'+fileType+'/frame.jsp' + '?' + escape(fileName);
	var MSIE = '/webservices/support/tutorials/'+fileType+'/page.jsp' + '?filesrc=' + fileName + "&filetitle=" + fileTitle + "&width=" + x + "&height=" + y;
	
	if (navigator.appName == 'Netscape')
	    flashWindow = window.open(NN,'AutomatedTutorial','width=' + x + ',height=' + y);
	else
	    flashWindow = window.open(MSIE,'AutomatedTutorial','width=' + x + ',height=' + y); //  + ',resizable=yes'
}


function openNTRsupport(department,survey,ref) { 
		window.open('http://na.ntrsupport.com/inquiero/anonymous2.asp?login=12552&lang=us&cat='+department+'&cob=1&surpre='+survey+'pre&sur='+survey+'post&ref='+ref,'WebAnonym','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=476,height=364,top=150,left=200');
	}
	
function viewReport(reportName,x,y) {
		var reportUrl = '/report/' + reportName ;
		myWindow = window.open(reportUrl,'loanmagicReport','width=' + x + ',height=' + y + ',scrollbars=yes,resizable=yes');
	}

function MM_openBrWindow(theURL,winName,features) { //v2.0
		window.open(theURL,winName,features);
	} //-->

function loanmagicSetup(URL) {
	var loanmagicSetup = null;
	if (loanmagicSetup == null || loanmagicSetup.closed) 
		loanmagicSetup = window.open(URL,'loanmagicSetup','width=745,height=514,scrollbars=no,resizable=no');  // width=665,height=593
	loanmagicSetup.focus();
}

function contactAddress(user, title) {
	var domain = "docmagic"; var tld = "com";
	var emailId = user + "\u0040" + domain + "." + tld;
	var url = "mailto:" + emailId;
	if (!title) {
		title = emailId;
	}
	document.write("<a class='sub' href='" + url + "'>" + title + "</a>");
}
	
