//---	Author: 	DK
//---	Company: 	Sharper Web Solutions, Inc  www.sharperweb.com
//---	Date: 		1/25/2002

var newWin;
var x;

function displayRealtorRates(ratesForm) {

var htmlDoc = "";
var rate = document.rratesForm.rate.value;
var rate_arm = document.rratesForm.rate_arm.value;
var loan_term = document.rratesForm.loan_term.value;
var points = document.rratesForm.points.value;
var loan_amount = document.rratesForm.loan_amount.value;
var hoa = document.rratesForm.hoa.value;
var taxes = document.rratesForm.taxes.value;
var closing_cost = document.rratesForm.closing_cost.value;
var i = 0;
var down = "";
var down_payment = 0;
var pmi_calc = 0;
var suggested_income = 0;
var cash_needed = 0;
var monthly_payment = 0;
var pi = 0;
var newWindow;
var monthlyrate;
var Prin;
var monthly_tax;
var rate_z;

var address = document.rratesForm.address.value;
var csz = document.rratesForm.csz.value;
var listingprice = document.rratesForm.listingprice.value;
var listedby = document.rratesForm.listedby.value;
var agent = document.rratesForm.agent.value;
var phone = document.rratesForm.phone.value;


if (rate == "") { alert("Please dont forget to enter the -Rate-!"); return false;}
if (rate_arm == "") { alert("Please dont forget to enter the -5 year ARM rate-!"); return false;}
if (points == "") { alert("Please dont forget to enter the -Points-!"); return false;}
if (loan_amount == "") { alert("Please dont forget to enter the -Loan Amount-"); return false;}
if (hoa == "") { alert("Please dont forget to enter the -HOA-!"); return false;}
if (taxes == "") { alert("Please dont forget to enter the -Taxes-!"); return false;}
if (closing_cost == "") { alert("Please dont forget to enter the -Closing Costs-!"); return false;}

//newWindow = window.open("","","status,height=450,width=450");

rate_z = rate/100; //convert to percentage
monthlyrate = rate_z/12;
monthly_tax = parseInt(taxes)/12;

htmlDoc += "<HTML><head>";
htmlDoc += createFont();
htmlDoc += "</head><BODY><center>"

	htmlDoc += "<table border=0 cellpadding=0 cellspacing=4 width=98%>";

  	htmlDoc += "<tr>";
    htmlDoc += "<td nowrap valign=top>";
    htmlDoc += "<br><b>Property Address </b><br>" + address + "<br>";
    htmlDoc += csz + "<br><BR>";
    htmlDoc += "<b>Listing Price </b><br>" + "$" + listingprice + "<br><br>";
    htmlDoc += "<b>Listed By </b><br>" + listedby + "<br>";
    htmlDoc += agent + "<br>";
    htmlDoc += phone + "<br><br><br><br>";

    htmlDoc += "Provided By:<br>";
    htmlDoc += "Integra Financial Group<br>";
    htmlDoc += "6565 N. Avondale ave.<br>";
    htmlDoc += "Suite 200<br>";
    htmlDoc += "Chicago, IL 60631<br>";
    htmlDoc += "<br>";
    htmlDoc += "Phone: (773)792-0000<br>";
    htmlDoc += "FAX: (773)792-0002<br><br>";
    htmlDoc += "info@integraloans.com<br>";
    htmlDoc += "www.integraloans.com</p>";
    htmlDoc += "</td>";
    htmlDoc += "<td width=50%>";

while ( i < 5 ) {

   switch (i) {


	case 0:
		down = "20 % Down - " + loan_term + " Year Fixed Rate.";
		down_payment = Math.round(loan_amount * 0.20);
		pmi_calc = 0;//Math.round((loan_amount *0.90/12)/100);
		cash_needed = parseInt(down_payment) + parseInt(closing_cost);
		Prin = parseInt(loan_amount) - parseInt(down_payment);
		pi = Math.floor((Prin*monthlyrate)/(1-Math.pow((1+monthlyrate),(-1*30*12)))*100)/100;
		monthly_payment = parseInt(pmi_calc) + pi + parseInt(hoa) + parseInt(monthly_tax);
	break


	case 1:
		down = "10 % Down - " + loan_term + " Year Fixed Rate.";
		down_payment = Math.round(loan_amount * 0.10);
		pmi_calc = Math.round(((loan_amount *0.58)/12)/100);
		cash_needed = parseInt(down_payment) + parseInt(closing_cost);
		Prin = parseInt(loan_amount) - parseInt(down_payment);
		pi = Math.floor((Prin*monthlyrate)/(1-Math.pow((1+monthlyrate),(-1*30*12)))*100)/100;
		monthly_payment = pmi_calc + pi + parseInt(hoa) + parseInt(monthly_tax);
	break

	case 2:
		down = "5 % Down - " + loan_term + " Year Fixed Rate.";
		down_payment = Math.round(loan_amount * 0.05);
		pmi_calc = Math.round(((loan_amount *0.78)/12)/100);
		cash_needed = parseInt(down_payment) + parseInt(closing_cost);
		Prin = parseInt(loan_amount) - parseInt(down_payment);
		pi = Math.floor((Prin*monthlyrate)/(1-Math.pow((1+monthlyrate),(-1*30*12)))*100)/100;
		monthly_payment = pmi_calc + pi + parseInt(hoa) + parseInt(monthly_tax);
	break

	case 3:
		down = "0 % Down  - " + loan_term + " Year Fixed Rate.";
		down_payment = 0;
		pmi_calc = Math.round((loan_amount *1.2/12)/100);
		cash_needed = parseInt(down_payment) + parseInt(closing_cost);
		Prin=parseInt(loan_amount) - parseInt(down_payment);
		pi = Math.floor((Prin*monthlyrate)/(1-Math.pow((1+monthlyrate),(-1*30*12)))*100)/100;
		monthly_payment = parseInt(pmi_calc) + pi + parseInt(hoa) + parseInt(monthly_tax);
	break

	case 4:

		rate_z = rate_arm/100; //convert to percentage
		monthlyrate = rate_z/12;

		down = "5 % Down - 5 Year ARM";
		down_payment = Math.round(loan_amount * 0.05);
		pmi_calc = Math.round((loan_amount *0.78/12)/100);
		cash_needed = parseInt(down_payment) + parseInt(closing_cost);
		Prin = parseInt(loan_amount) - parseInt(down_payment);
		pi = Math.floor((Prin*monthlyrate)/(1-Math.pow((1+monthlyrate),(-1*30*12)))*100)/100;
		monthly_payment = parseInt(pmi_calc) + pi + parseInt(hoa) + parseInt(monthly_tax);
		rate = rate_arm;
	break

		default:
		down = "Percent down not known";
	}

	htmlDoc += "<table border=0 cellpadding=2 cellspacing=0 width=425>";

  	htmlDoc += "<tr>";
    htmlDoc += "<td colspan=5 height=15>";
    htmlDoc += "</td>";
  	htmlDoc += "</tr>";

 	htmlDoc += "<tr bgcolor=white>";
    htmlDoc += "<td colspan=5 bgcolor=#008080>";
   	htmlDoc += "<b><font color=#FFFFFF>" + down + "</font></b></td>";
  	htmlDoc += "</tr>";

  	htmlDoc += "<tr bgcolor=white>";
    htmlDoc += "<td>Rate</td>";
    htmlDoc += "<td>" + rate + "%</td>";
    htmlDoc += "<td></td>";
    htmlDoc += "<td>PI</td>";
    htmlDoc += "<td>$" + Math.round(pi) + "</td>";
  	htmlDoc += "</tr>";

  	htmlDoc += "<tr bgcolor=white>";
    htmlDoc += "<td>Points</td>";
    htmlDoc += "<td nowrap>" + points + "</td>";
    htmlDoc += "<td></td>";
    htmlDoc += "<td>PMI</td>";
    htmlDoc += "<td>$" + Math.round(pmi_calc) + "</td>";
  	htmlDoc += "</tr>";

  	htmlDoc += "<tr bgcolor=white>";
    htmlDoc += "<td nowrap>Down Payment</td>";
    htmlDoc += "<td>$" + Math.round(down_payment) + "</td>";
    htmlDoc += "<td></td>";
    htmlDoc += "<td>HOA Fees</td>";
    htmlDoc += "<td>$" + Math.round(hoa) + "</td>";
  	htmlDoc += "</tr>";

  	htmlDoc += "<tr bgcolor=white>";
    htmlDoc += "<td nowrap>Cash needed to close</td>";
    htmlDoc += "<td>$" + Math.round(cash_needed) + "</td>";
    htmlDoc += "<td></td>";
    htmlDoc += "<td nowrap>Taxes</td>";
    htmlDoc += "<td>$" + Math.round(taxes/12) + "</td>";
  	htmlDoc += "</tr>";

  	htmlDoc += "<tr bgcolor=gray>";
    htmlDoc += "<td colspan=5>";
    htmlDoc += "</td>";
  	htmlDoc += "</tr>";
  	
  	htmlDoc += "<tr bgcolor=white>";
    htmlDoc += "<td nowrap></td>";
    htmlDoc += "<td></td>";
    htmlDoc += "<td></td>";
    htmlDoc += "<td nowrap><b>Total Monthly Payment</b></td>";
    htmlDoc += "<td><b>$" + Math.round(monthly_payment) + "</b></td>";
  	htmlDoc += "</tr>";

	htmlDoc += "</table>";

	i = i + 1;

	}

	htmlDoc += "</td></tr>";
	htmlDoc += "<tr><td width=100% valign=bottom align=center colspan=2><p><br>All rights reserved : Integra Financial Group</td></tr>";
	htmlDoc += "</table>";
	htmlDoc += "</center></body></html>";

	alignRealtorWindow(htmlDoc);

}



function displayRefi(ratesForm) {

var htmlDoc = "";
var rate = document.ratesForm.rate.value;
var loan_term = document.ratesForm.loan_term.value;
var rate_refi = document.ratesForm.rate_refi.value;
var points = 1; //temporary set to 1 -- document.ratesForm.points.value
var loan_amount = document.ratesForm.loan_amount.value;
var taxes = document.ratesForm.taxes.value;
var closing_cost = 1; //temporary set to 1 -- document.ratesForm.closing_cost.value
var i = 0;
var down = "";
var down_payment = 0;
var pmi_calc = 0;
var suggested_income = 0;
var cash_needed = 0;
var monthly_payment = 0;
var monthly_payment_current;
var monthly_payment_refi;
var pi = 0;
var newWindow;
var monthlyrate;
var Prin;
var monthly_tax;
var rate_z;
var rate_y;
var monthlyrate_y;

if (loan_amount == "") { alert("Please don't forget to enter the -Loan Amount-"); return;}
if (rate == "") { alert("Please don't forget to enter the -Current Interest Rate-!"); return;}
if (rate_refi == "") { alert("Please don't forget to enter the -Another Interest Rate for comparison- !"); return;}
if (taxes == "") { alert("Please don't forget to enter the -Taxes-!"); return;}

rate_z = rate/100; //convert to percentage
monthlyrate = rate_z/12;
monthly_tax = parseInt(taxes)/12;

rate_y = rate_refi/100;
monthlyrate_y = rate_y/12;

htmlDoc += "<HTML><head>";
htmlDoc += createFont();
htmlDoc += "</head><BODY><center>"

	htmlDoc += "<table border=0 cellpadding=0 cellspacing=0 width=95%>";
  	htmlDoc += "<tr>";
    		htmlDoc += "<td align=center><br><b>Integra Financial - Refinance calculator<br></b>";
    		htmlDoc += "</td>";
  	htmlDoc += "</tr>";
	htmlDoc += "</table>";

while ( i < 2 ) {

   switch (i) {

	case 0:
		down = rate + "% Interest - " + loan_term + " Year Fixed Rate.";
		down_payment = 0;
		pmi_calc = Math.round((loan_amount *1.2/12)/100);
		cash_needed = parseInt(down_payment) + parseInt(closing_cost);
		Prin=parseInt(loan_amount) - parseInt(down_payment);
		pi = Math.floor((Prin*monthlyrate)/(1-Math.pow((1+monthlyrate),(-1*loan_term*12)))*100)/100;
		monthly_payment = parseInt(pmi_calc) + pi + parseInt(monthly_tax);
		monthly_payment = "Your current mortgage is approximately: " + "&nbsp;&nbsp;&nbsp;&nbsp;<b>$" + Math.round(monthly_payment) + "</b>";
	break

	case 1:
		down = rate_refi + "% Interest - " + loan_term + " Year Fixed Rate.";
		down_payment = 0;
		pmi_calc = Math.round((loan_amount *1.2/12)/100);
		cash_needed = parseInt(down_payment) + parseInt(closing_cost);
		Prin=parseInt(loan_amount) - parseInt(down_payment);
		pi = Math.floor((Prin*monthlyrate_y)/(1-Math.pow((1+monthlyrate_y),(-1*loan_term*12)))*100)/100;
		monthly_payment = parseInt(pmi_calc) + pi + parseInt(monthly_tax);
		monthly_payment = "If you refinance your mortgage will be: " + "&nbsp;&nbsp;&nbsp;&nbsp;<b>$" + Math.round(monthly_payment) + "</b>";
	break	

		default:
		down = "Percent down not known";
	}

	htmlDoc += "<table border=0 cellpadding=2 cellspacing=0 width=95%>";

  	htmlDoc += "<tr>";
    		htmlDoc += "<td colspan=5 height=15>";
    		htmlDoc += "</td>";
  	htmlDoc += "</tr>";

  	htmlDoc += "<tr>";
    		htmlDoc += "<td colspan=5>";
    		htmlDoc += "</td>";
  	htmlDoc += "</tr>";

 	htmlDoc += "<tr bgcolor=white>";
    		htmlDoc += "<td colspan=5 bgcolor=navy>";
   		htmlDoc += "<b><font color=#FFFFFF>" + down + "</font></b></td>";
  	htmlDoc += "</tr>";

  	htmlDoc += "<tr bgcolor=white>";
    		htmlDoc += "<td colspan=5 height=11>";
    		htmlDoc += "</td>";
  	htmlDoc += "</tr>";


  	htmlDoc += "<tr bgcolor=white>";
    		htmlDoc += "<td>" + monthly_payment + "</td>";
    	htmlDoc += "</tr>";
    	
	htmlDoc += "</table>";

	i = i + 1;

	}
	
	htmlDoc += "<br><br>NOTE: These numbers are an approximation based on the numbers you gave us. For more information please contact us at (773)792-0000";	
	htmlDoc += "</center></body></html>";
	
	alignWindow(htmlDoc);
}

function displayRates(ratesForm) {

var htmlDoc = "";
var rate = document.ratesForm.rate.value;
var loan_term = document.ratesForm.loan_term.value;
var points = document.ratesForm.points.value;
var loan_amount = document.ratesForm.loan_amount.value;
var taxes = document.ratesForm.taxes.value;
var closing_cost = document.ratesForm.closing_cost.value;
var i = 0;
var down = "";
var down_payment = 0;
var pmi_calc = 0;
var suggested_income = 0;
var cash_needed = 0;
var monthly_payment = 0;
var pi = 0;
var newWindow;
var monthlyrate;
var Prin;
var monthly_tax;
var rate_z;

if (loan_amount == "") { alert("Please don't forget to enter the -Loan Amount-"); return;}
if (rate == "") { alert("Please don't forget to enter the -Rate-!"); return;}
if (points == "") { alert("Please don't forget to enter the -Points-!"); return;}
if (taxes == "") { alert("Please don't forget to enter the -Taxes-!"); return;}
if (closing_cost == "") { alert("Please don't forget to enter the -Closing Costs-!"); return;}

rate_z = rate/100; //convert to percentage
monthlyrate = rate_z/12;
monthly_tax = parseInt(taxes)/12;

htmlDoc += "<HTML><head>";
htmlDoc += createFont();
htmlDoc += "</head><BODY><center>"

	htmlDoc += "<table border=0 cellpadding=0 cellspacing=0 width=95%>";
  	htmlDoc += "<tr>";
    		htmlDoc += "<td><br><b>Integra Financial : Mortgage Payment Calculator<br></b>";
    		htmlDoc += "</td>";
  	htmlDoc += "</tr>";
	htmlDoc += "</table>";

while ( i < 4 ) {

   switch (i) {


	case 0:
		down = "0 % Down - " + loan_term + " Year Fixed Rate.";
		down_payment = 0;
		pmi_calc = Math.round((loan_amount *1.2/12)/100);
		cash_needed = parseInt(down_payment) + parseInt(closing_cost);
		Prin=parseInt(loan_amount) - parseInt(down_payment);
		pi = Math.floor((Prin*monthlyrate)/(1-Math.pow((1+monthlyrate),(-1*loan_term*12)))*100)/100;
		monthly_payment = parseInt(pmi_calc) + pi + parseInt(monthly_tax);
	break

	case 1:
		down = "5 % Down - " + loan_term + " Year Fixed Rate.";
		down_payment = Math.round(loan_amount * 0.05);
		pmi_calc = Math.round(((loan_amount *0.78)/12)/100);
		cash_needed = parseInt(down_payment) + parseInt(closing_cost);
		Prin = parseInt(loan_amount) - parseInt(down_payment);
		pi = Math.floor((Prin*monthlyrate)/(1-Math.pow((1+monthlyrate),(-1*loan_term*12)))*100)/100;
		monthly_payment = pmi_calc + pi + parseInt(monthly_tax);
	break
	
	case 2:
		down = "10 % Down - " + loan_term + " Year Fixed Rate.";
		down_payment = Math.round(loan_amount * 0.10);
		pmi_calc = Math.round(((loan_amount *0.52)/12)/100);
		cash_needed = parseInt(down_payment) + parseInt(closing_cost);
		Prin = parseInt(loan_amount) - parseInt(down_payment);
		pi = Math.floor((Prin*monthlyrate)/(1-Math.pow((1+monthlyrate),(-1*loan_term*12)))*100)/100;
		monthly_payment = pmi_calc + pi + parseInt(monthly_tax);
	break		

	case 3:
		down = "20 % Down - " + loan_term + " Year Fixed Rate.";
		down_payment = Math.round(loan_amount * 0.20);
		pmi_calc = 0;
		cash_needed = parseInt(down_payment) + parseInt(closing_cost);
		Prin = parseInt(loan_amount) - parseInt(down_payment);
		pi = Math.floor((Prin*monthlyrate)/(1-Math.pow((1+monthlyrate),(-1*loan_term*12)))*100)/100;
		monthly_payment = pmi_calc + pi + parseInt(monthly_tax);
	break	
	
	default:
	down = "Percent down not known";
	}

	htmlDoc += "<table border=0 cellpadding=2 cellspacing=0 width=95%>";

  	htmlDoc += "<tr>";
    		htmlDoc += "<td colspan=5 height=8>";
    		htmlDoc += "</td>";
  	htmlDoc += "</tr>";

  	htmlDoc += "<tr bgcolor=white>";
    		htmlDoc += "<td colspan=5>";
    		htmlDoc += "</td>";
  	htmlDoc += "</tr>";

 	htmlDoc += "<tr bgcolor=white>";
    		htmlDoc += "<td colspan=5 bgcolor=navy>";
   		htmlDoc += "<b><font color=#FFFFFF>" + down + "</font></b></td>";
  	htmlDoc += "</tr>";

  	htmlDoc += "<tr>";
    		htmlDoc += "<td colspan=5>";
    		htmlDoc += "</td>";
  	htmlDoc += "</tr>";

  	htmlDoc += "<tr bgcolor=white>";
    		htmlDoc += "<td>Rate</td>";
    		htmlDoc += "<td align=right>" + rate + "%</td>";
    		htmlDoc += "<td></td>";
    		htmlDoc += "<td>PI</td>";
    		htmlDoc += "<td align=right>$" + Math.round(pi) + "</td>";
  	htmlDoc += "</tr>";

  	htmlDoc += "<tr bgcolor=white>";
    		htmlDoc += "<td>Points</td>";
    		htmlDoc += "<td nowrap align=right>" + points + "</td>";
    		htmlDoc += "<td></td>";
    		htmlDoc += "<td>PMI</td>";
    		htmlDoc += "<td align=right>$" + Math.round(pmi_calc) + "</td>";
  	htmlDoc += "</tr>";

  	htmlDoc += "<tr bgcolor=white>";
    		htmlDoc += "<td nowrap>Down Payment</td>";
    		htmlDoc += "<td align=right>$" + Math.round(down_payment) + "</td>";
    		htmlDoc += "<td></td>";
    		htmlDoc += "<td>Taxes</td>";
    		htmlDoc += "<td align=right>$" + Math.round(taxes/12) + "</td>";
  	htmlDoc += "</tr>";

  	htmlDoc += "<tr bgcolor=white>";
    		htmlDoc += "<td nowrap></td>";
    		htmlDoc += "<td align=right><!-- parseInt(loan_amount/3/12)  --></td>";
    		htmlDoc += "<td></td>";
    		htmlDoc += "<td nowrap>Cash needed to close</td>";
    		htmlDoc += "<td align=right>$" + Math.round(cash_needed) + "</td>";
  	htmlDoc += "</tr>";
  	
  	  	htmlDoc += "<tr>";
	    		htmlDoc += "<td colspan=5></td>";
    	htmlDoc += "</tr>";

  	htmlDoc += "<tr bgcolor=white>";
    		htmlDoc += "<td colspan=4 align=right><b>Total Monthly Payment</b>&nbsp;&nbsp;</td>";
    		htmlDoc += "<td align=right><b>$" + Math.round(monthly_payment) + "</b></td>";
    	htmlDoc += "</tr>";
    	
	htmlDoc += "</table>";

	i = i + 1;

	}
	htmlDoc += "</center></body></html>";

	alignWindow(htmlDoc)
}


/*
function calculateIncome(formIncome) {
	
	var htmlDocc = "";
	var totalIncome = 0;
	x = screen.availWidth-475-20;
	var strText = "You can borrow approximatelly: ";
	var strText2 = "  <BR><BR><b>Note:</b> This amount is an approximation.  An example of something that may affect your borrowing power is how much other debt you currently have.  To get prequalified or for any related questions please contact us at (773)792-0000"; 
	
	if (document.formIncome.income.value == "") { alert("Please don't forget to enter your -Total Income-"); return;}

	totalIncome = Math.round(document.formIncome.income.value);

	totalIncome = totalIncome * 3;

	htmlDocc += "<b>IntegraLoans - How much can you borrow?</b>";	
	
	htmlDocc += "<table width=95% border=0 cellpadding=2 cellspacing=0>";

  	htmlDocc += "<tr>";
    		htmlDocc += "<td colspan=5 height=15>";
    		htmlDocc += "</td>";
  	htmlDocc += "</tr>";

  	htmlDocc += "<tr>";
    		htmlDocc += "<td colspan=5>";
    		htmlDocc += "</td>";
  	htmlDocc += "</tr>";

 	htmlDocc += "<tr>";
    		htmlDocc += "<td colspan=5 bgcolor=navy height=20>";
   		htmlDocc += "<b><font color=#FFFFFF>" + "Your Borrowing Power" + "</font></b></td>";
  	htmlDocc += "</tr>";

  	htmlDocc += "<tr>";
    		htmlDocc += "<td colspan=5 height=15>&nbsp;";
    		htmlDocc += "</td>";
  	htmlDocc += "</tr>";


  	htmlDocc += "<tr>";
    		htmlDocc += "<td>" + strText + "<b>$ " + totalIncome + "</b>"  + "</td>";
    	htmlDocc += "</tr>";
    	
	htmlDocc += "</table>";

	htmlDocc += strText2;

	htmlDocc += "<center><br><a href=" + "javascript:window.close()" + " >Close Window</a></center>";
	
	alignWindow(createFont() + htmlDocc);
}
*/


////////////////////////////////////
function alignWindow(content){

	var xWidth = 500;
	var yHeight = 490;
	x = window.screenLeft + document.body.clientWidth - xWidth + 10;
	y = window.screenTop;

	//if (site == null ) {  // gives this method the ability to call it with or wihout a url param
	//	site = "http://www.integraloans.com"
	//}

	var newWindow = window.open("", "external" , "width="+xWidth+  ",height="+yHeight+ ",top="+y+  ",left="+x + ", toolbar=no,location=no,status=no,menubar=yes,scrollbars=yes,resizable=yes");
	newWindow.document.writeln(content);
	newWindow.focus();
	newWindow.document.close();
}

////////////////////////////////////
function alignRealtorWindow(content){

	var xWidth = 650;
	var yHeight = 525;
	x = window.screenLeft + document.body.clientWidth - xWidth + 10;
	y = window.screenTop;

	//if (site == null ) {  // gives this method the ability to call it with or wihout a url param
	//	site = "http://www.integraloans.com"
	//}

	var newWindow = window.open("", "external" , "width="+xWidth+  ",height="+yHeight+ ",top="+y+  ",left="+x + ", toolbar=no,location=no,status=no,menubar=yes,scrollbars=yes,resizable=yes");
	newWindow.document.writeln(content);
	newWindow.focus();
	newWindow.document.close();
}

function createFont(){

	var setFonts = '<link href="/include/css/styles.css" rel="stylesheet" type="text/css">';

	return setFonts;
}