<!--
function mOvr(obj, css_class){
	if(document.all)
	{
		obj.className = css_class;
	}
}

//function clearTextBox(objTextbox)
//{
//	objTextbox.value = '';
//}

function randNum (num) 
{
    var now = new Date();                                 
    var rand = Math.round(num * Math.cos(now.getTime())); 
    if (rand < 0) rand = - rand; if (rand == 0) rand++;
    return rand;
}

function setImagesInner()
{
x = randNum(9);
document.MainImage.src = "../images/topImages/innerImage" + x + ".jpg";
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function setImages()
{
x = randNum(3);
document.MainImage.src = "images/topImages/homeImage" + x + ".jpg";

}

function clearTextBox(obj)
{
	if (obj.value == '')
	{
		if (obj.name == 'username')
		{
			obj.value = 'User Name'
		}
		else if (obj.name == 'password')
		{
			obj.value = 'Password'
		}
	}
	else if (obj.value == 'User Name' || obj.value == 'Password' || obj.value == 'Email' || obj.value == 'Name' || obj.value == 'Number')
	{
			obj.value = '';
	}
}
function openMenu()
{
	if(document.all['property_subnav'].style.display == '')
	{
		document.all['property_subnav'].style.display = 'none';
	}
	else if (document.all['property_subnav'].style.display == 'none')
	{
		document.all['property_subnav'].style.display = '';
	}
}
function validate()
{		
		if (document.login_form.username.value == '' || document.login_form.username.value == 'User Name' || document.login_form.password.value == '' || document.login_form.password.value == 'Password')
		{
			alert ('Please enter a username and password');
		}
		else
		{			
			document.login_form.submit();
		}
	
	
}

function doAttach(strName,strDocType)
{
	//alert (bMultiple);
	//window.open('includes/upload.asp?bMultiple=' + bMultiple, 'Upload','height=300,width=400')
	//window.open('includes/upload.asp?DocType=' + strDocType + '&amp;bMultiple=' + bMultiple, 'Upload','height=300,width=400')
	window.open('includes/upload.asp?DocType=' + strDocType + '&amp;strName=' + strName, 'Upload','height=300,width=400')
}

function clearTextBox(box)
{		
	box.value = '';
}

function savecontent()
{	
	if (document.frmEditContent.content_title.value == '')
		{
		alert ('Please enter a content title');			
		document.frmEditContent.content_title.focus();
		}
	else
		{
		document.frmEditContent.form_action.value = "save";	
		document.frmEditContent.submit();
		}
}

function deletecontent()
{	
	document.frmEditContent.form_action.value = "delete";
	
	document.frmEditContent.submit();
}

function submitcontact()
{	
	document.frmcontactus.form_action.value = "save";
	document.frmcontactus.submit();
	
}

function navigate(rid)
{
	window.parent.location = '/SCDNews/newsArticle.asp?content_rid=' + rid;
}

function printwindow(rid)

{

var loc = 'PrintDetails.asp?content_rid=' + rid
//var loc = 'test.asp?content_rid=' + rid


window.open(loc,"my_new_window","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=700, height=700")

}

function printindexwindow(type)
{
	var loc = 'PrintIndexDetails.asp?type=' + type
	window.open(loc,"my_new_window","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width=700, height=850")
}


function Printme()

{	
	document.PrintButton.style.visibility = 'hidden';
	
	print(this);	
	
}

function preview(RID,Mode,TypeCode,TypeRID)
	{	
		
		//window.open('preview.asp?NewsID=<%=intNewsID%>', 'Preview')
		if (TypeCode == 'Projects')
		{
			window.open('/projects/projectDetails.asp?content_rid=' + RID + '&amp;Mode=' + Mode + '&amp;type=' + TypeCode + '&amp;typeRID=' + TypeRID + '&amp;preview=true','Preview') 
		}
		else if (TypeCode == 'News')
		{
			window.open('/SCDNews/newsArticle.asp?content_rid=' + RID + '&amp;Mode=' + Mode + '&amp;type=' + TypeCode + '&amp;typeRID=' + TypeRID + '&amp;preview=true','Preview') 
		}
		else
		{
			window.open('/forsale/propertyDetails.asp?content_rid=' + RID + '&amp;Mode=' + Mode + '&amp;type=' + TypeCode + '&amp;typeRID=' + TypeRID + '&amp;preview=true','Preview') 
		}
	}

function MM_openImageWindow(theURL) { //v2.0

  window.open(theURL,'','height=358,width=500');
}

//-->
