
function getRandom(maxval)
{
    var ranNum= Math.floor(Math.random()*maxval);
    return ranNum;
}

function dwrt_hdrimg()
{
	a = Math.random() + "";
	imgstr = "<td width=\"305\"><img src=\"../images/ukh3" + a.charAt(4) + ".jpg\" width=\"305\" height=\"170\" alt=\"UK Property Loans - Bridge Finance\" /></td>\n";

	document.write(imgstr);
}


function dwrt_email()
{
	user = "info";
	site = "UkPropertyLoans.com";
    emailstr = '<a href=\"mailto:' + user + '@' + site + '\">' + user + '@' + site + '</a>';
	
	document.write(emailstr);
}

var quote;
var story;
function set_testi()
{
	var a = Math.random() + "";
	var r = getRandom(2);
	quotes = new Array;
	quotes[0] = "&#147;I needed £500,000 ... I contacted UKpropertyloans.com who were able to arrange it within 2 weeks.&#148;<br><b>Brian, Essex</b>";
    quotes[1] = "&#147;I had a deal fall through with another lender at the 12th hour, UK Propertyloans were able to step in and structure a deal immediately&#148;<br><b>Patrick, Lincs</b>";
	quotes[10] = "&#147;I needed £500,000 to secure a the purchase of business in Bury. I contacted UKpropertyloans.com who were able to arrange the finance within 2 weeks. I now use UKpropertyloans.com for all my short term financing needs.&#148;<br><b>Brian, Essex</b>";
    quotes[11] = "&#147;I had a deal fall through with another lender at the 12th hour, UK Propertyloans were able to step in and structure a deal enabling me to pay off my existing commercial mortgage, whilst giving me extra funds to buy some adjoining land to expand my business, since then I haven’t looked back&#148;<br><b>Patrick, Lincs</b>";
    quote = quotes[r & 0x01];
	story = quotes[(r & 0x01) + 10];
}
function dwrt_test()
{
	document.write(quote);	
}

/* launches pop-up windows */
/* #################################### */
function NavigateOpen(Location,Width,Height){
	x=Width;
	y=Height;
	xresnow = x;
	yresnow = y;
	if (navigator.appVersion.indexOf("Mac")!=-1 && document.all) {
			xresnow-=0;
			yresnow-=0;
	}
	xl = (screen.availWidth/2)-(xresnow/2);
	tt = (screen.availHeight/2)-(yresnow/2);
  if (document.all) mw=window.open(Location,'mwi','resizable=yes,toolbar=no,scrollbars=yes,width='+xresnow+',height='+yresnow+',left='+xl+',top='+tt);
  else {
    if (parseFloat(navigator.appVersion)<4.75)
      mw=window.open(Location,'mwi','left='+xl+',top='+tt+',width='+x+',height='+y+',resizable=yes,toolbar=no,scrollbars=yes,status=0,location=0');
    else {
      mw=window.open(Location,'mwi','left='+xl+',top='+tt+',width='+x+',height='+y+',resizable=yes,toolbar=no,scrollbars=yes,status=0,location=0');
      setTimeout("mwFix("+xl+","+tt+",x,y)",10);
    }
  }
}

function popToFront () {
	mw.focus ()
}


