function openWindow(sUrl,sRef,sWidth,sHeight,sProperties) {
	//alert('');
	//if(sProperties=='')
	//{
		sWidth= (sWidth=='') ? screen.width * 0.85 : sWidth ;		// 70%
		sHeight= (sHeight=='') ? screen.height * 0.75 : sHeight;	// 70%
		var iLeft = (screen.width  - sWidth ) / 2 ;
		var iTop  = ( screen.height - sHeight ) / 2 ;

		var sProperties = (sProperties=='') ? "toolbar=no,status=yes,resizable=no,dependent=yes,scrollbars=no" : sProperties ;
		sProperties += ",width=" + sWidth ;
		sProperties += ",height=" + sHeight ;
		sProperties += ",left=" + iLeft ;
		sProperties += ",top=" + iTop ;
		//'toolbar=no,width=800,height=670,directories=no,status=yes,scrollbars=yes,resizable=yes,menubar=no';
	//}
	window.open(sUrl,sRef,sProperties);

}

function clearForm(form) {
	for (i=0;i<form.elements.length;i++) {
		//alert(form.elements[i].type);
		if(form.elements[i].type=="text" || form.elements[i].type=="textarea") {
			form.elements[i].value="";
		} else if(form.elements[i].type=="select-one") {
			form.elements[i].selectedIndex=0;
		} else if(form.elements[i].type=="checkbox" || form.elements[i].type=="radio") {
			form.elements[i].checked=false; 
		}
	}
}


//added to refresh member page's right hand status when vista iframe loads.
//VB. 2010-06-28
function refreshLoginDiv() {
	//alert("I am in Refresh Login Div");
	var sTargetDiv = '#loginContainer' ;
	var sPage = '/__cmsys/@Templates/@page/@includes/@yourprofile.asp' ;
	RewriteDiv(sTargetDiv, sPage);
}

function RewriteDiv(sDiv, sPage) {
//	$(sDiv).load(sPage, function() {alert('Load was performed.');} ) ;	//jquery ajax call

	$(sDiv).load(sPage) ;	
}

