function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changePicture(index) {
	if (document.images && (preloadFlag == true)) {
		window.document.main_picture.src = pictures[index].src;
		pictures['0'] = index;
	}
}

function StringsMatch(string1, string2)
{
var x = 0;
var strings_match = true;

if(string1.length != string2.length)
	{
	return false;
	}
	
for(x = 0; x < string1.length; x++)
	{
	if (string1.charAt(x) != string2.charAt(x))
		{
		strings_match = false;
		}
	}
return strings_match;
}

function callPrintDialog()
{
	var BrowserName = navigator.appName;
	if(navigator.userAgent.indexOf('Mac') != -1&&BrowserName != "Netscape")
	{
		alert("Please use the 'Print' option of your Browser to print this page");
	}
	else
	{
		window.print();
	}
}

function ManagePictures(pid, db) {
	var window_width = 550;
	var window_height = 600;
	var height = window.screen.availHeight;
	var width = window.screen.availWidth;
	var left_point = parseInt(width / 2) - parseInt(window_width / 2);
	var top_point = parseInt(height / 2) - parseInt(window_height / 2);
	var properties = "height=" + window_height + ",width=" + window_width + ",left=" + left_point + ",top=" + top_point + ",status,resizeable,scrollbars";
	window.open("http://www.renorentalhomes.com/picturemanager.php?pid=" + pid +"&db=" + db, 'PictureManager', properties);
	return false;
}
function LargePicture(pid, db) {
	var window_width = 550;
	var window_height = 600;
	var height = window.screen.availHeight;
	var width = window.screen.availWidth;
	var left_point = parseInt(width / 4) - parseInt(window_width / 4);
	var top_point = parseInt(height / 4) - parseInt(window_height / 4);
	var properties = "height=" + window_height + ",width=" + window_width + ",left=" + left_point + ",top=" + top_point + ",status,resizeable,scrollbars";
	window.open("http://www.renorentalhomes.com/lib/largepicture.php?id=" + pid + "&db=" + db + "&it=3", 'LargePicture', properties);
	return false;
}
function MyList(func, uid, aid) {
	var window_width = 300;
	var window_height = 300;
	var height = window.screen.availHeight;
	var width = window.screen.availWidth;
	var left_point = parseInt(width / 4) - parseInt(window_width / 4);
	var top_point = parseInt(height / 4) - parseInt(window_height / 4);
	var properties = "height=" + window_height + ",width=" + window_width + ",left=" + left_point + ",top=" + top_point + ",status,resizeable,scrollbars";
	window.open("http://www.renorentalhomes.com/lib/mylist.php?f=" + func + "&uid=" + uid + "&aid=" + aid, 'MyList', properties);
	return false;
}
function reSortOnChange() {
	document.data_table.action.value = 'reload';
	document.data_table.reload.value = '1';
	document.data_table.submit();
	return true;
}
function displayDetails(id){
	document.details.record.value = id;
	document.details.submit();
	return true;
}
