function OpenWindow(pURL, pWidth, pHeight)
{
  var win = window.open(pURL, 'win', 'dependent,width=' + pWidth + ',height=' + pHeight);
}

function OpenScrollWindow(pURL, pWidth, pHeight)
{
  var win = window.open(pURL, 'scrollwin', 'dependent,width=' + pWidth + ',height=' + pHeight + ',scrollbars=1');
}

function OpenPicture(pPicture, pWidth, pHeight)
{
  OpenWindow('/openpicture.asp?picture=' + pPicture, (parseInt(pWidth) + 20), (parseInt(pHeight) + 45));
}

function MailTo(pUsername, pDomain)
{
  var strLink = 'mailto:' + pUsername + '@' + pDomain;
  window.open(strLink);
}

function checkValidEmail(pValue)
{
	var x = pValue;
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (filter.test(x)) return true;
	else return false;
}

$(document).ready(function(){
					 
	var el = $('div#content_left');
	var contentReplaceLeft = $(el).html().replace(/motorexperience/gi, "Motor<span class='motorX_left'>X</span>perience");
	$(el).html(contentReplaceLeft);
	//$(el).html($(el).html().replace(/motorexperience/gi, "Motor<span class='motorX_left'>X</span>perience"));
	
	var elR = $('div#content_right_main');
	var contentReplaceRight = $(elR).html().replace(/motorexperience/gi, "Motor<span class='motorX_right'>X</span>perience");
	elR.html(contentReplaceRight);
	//$(elR).html($(elR).html().replace(/motorexperience/gi, "Motor<span class='motorX_right'>X</span>perience"));	
					 
});
