function decision(url,delete_what){
	var message = "Are you sure that you want to delete " + delete_what + "?";
	if(confirm(message)) window.location.href = url;
}



function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}

}

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

function insertFlashSlideShow(swf, xml_file, width, height) { 
	document.write('<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\"' + width + '\" height=\"' + height + '\" id=\"tech\" align=\"middle\">\n');
	document.write('<param name=\"allowScriptAccess\" value=\"sameDomain\">\n');
	document.write('<param name=\"movie\" value=\"/' + swf + '?xml_path=' + xml_file + '\">\n');
	document.write('<param name=\"quality\" value=\"high\">\n');
	document.write('<param name=\"wmode\" value=\"transparent\">\n'); 
	document.write('<embed src=\"/' + swf + '?xml_path=' + xml_file + '\" quality=\"high\" width=\"' + width + '\" height=\"' + height + '\" name=\"tech\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" wmode=\"transparent\">\n');
	document.write('</object>\n');
}

function insertHomeFlash() {
	var flash_src = '';
	flash_src += '<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0\" width=\"696\" height=\"337\">\n';
	flash_src += '<param name=\"movie\" value=\"/home_movie_xml.swf\" />\n';
	flash_src += '<param name=\"quality\" value=\"high\" />\n';
	flash_src += '<param name=\"wmode\" value=\"transparent\">\n'; 
	flash_src += '<embed src=\"/home_movie_xml.swf\" quality=\"high\" pluginspage=\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"696\" height=\"337\">\n';
	flash_src += '</embed>';
	flash_src += '</object>';
	document.write(flash_src);
	
}

function showAlternativeHTML() {
	var text = '';
	text += '<table cellspacing="0" cellpadding="0" border="0" width="697">';
	text += '<tr>';
	text += '<td align="left" valign="top" colspan="100%" height="299">';
	text += '<a id="main_link" href="/solutions/index.html" onFocus="blur(this);"><img name="main_image" src="/images/efile/home/capture_main_image.jpg" width="697" height="299" border="0"></a></td>';
	text += '</tr>';
	text += '<tr>';
	text += '<td align="left" valign="top" width="266" height="37">';
	text += '<a id="nav_capture_link"';
	text += 'onmouseover="changeImages(\'main_image\', \'/images/efile/home/capture_main_image.jpg\');changeImages(\'nav_capture\', \'/images/efile/home/capture_over.png\');return true;"';
	text += 'onmouseout="changeImages(\'nav_capture\', \'/images/efile/home/capture.png\');return true;"';
	text += 'onFocus="blur(this);" href="/solutions/index.html" target="_parent"><img name="nav_capture" src="/images/efile/home/capture.png" width="226" height="37" border="0"></a></td>';
	text += '<td align="left" valign="top" width="9" height="37">';
	text += '<img src="/images/efile/home/divider1.png" width="9" height="37" border="0"></td>';
	text += '<td align="left" valign="top" width="226" height="37">';
	text += '<a id="nav_manage_link"';
	text += 'onmouseover="changeImages(\'main_image\', \'/images/efile/home/manage_main_image.jpg\');changeImages(\'nav_manage\', \'/images/efile/home/manage_over.png\'); return true;"';
	text += 'onmouseout="changeImages(\'nav_manage\', \'/images/efile/home/manage.png\');return true;"';
	text += 'onFocus="blur(this);" href="/solutions/index.html" target="_parent"><img name="nav_manage" src="/images/efile/home/manage.png" width="226" height="37" border="0"></a></td>';
	text += '<td align="left" valign="top" width="10" height="37">';
	text += '<img src="/images/efile/home/divider2.png" width="10" height="37" border="0"></td>';
	text += '<td align="left" valign="top" width="226" height="37">';
	text += '<a id="nav_protect_link"';
	text += 'onmouseover="changeImages(\'main_image\', \'/images/efile/home/protect_main_image.jpg\');changeImages(\'nav_protect\', \'/images/efile/home/protect_over.png\');return true;"';
	text += 'onmouseout="changeImages(\'nav_protect\', \'/images/efile/home/protect.png\');return true;"';
	text += 'onFocus="blur(this);" href="/solutions/index.html" target="_parent"><img name="nav_protect" src="/images/efile/home/protect.png" width="226" height="37" border="0"></a></td>';
	text += '</tr>';
	text += '</table>';
	text += '<div align="center" style=\"padding-top:2px;">This site requires Adobe Flash Player 9.0.28 or higher - <a href="http://www.adobe.com/go/getflash/" onFocus="blur(this);" target="_blank">Install Flash</a></div>';
	document.write(text);
}

var preloadFlag = false;
function preloadImages() {
	if(document.images) {
		image_over_0 = newImage('/images/rbc/nav/company-over.png');
		image_over_1 = newImage('/images/rbc/nav/services-over.png');
		image_over_2 = newImage('/images/rbc/nav/employment-over.png');
		image_over_3 = newImage('/images/rbc/nav/subcontractors-over.png');
		image_over_4 = newImage('/images/rbc/nav/contact-over.png');
		secondary_nav = newImage('/images/rbc/nav/secondary_nav.png');
		secondary_nav_over = newImage('/images/rbc/nav/secondary_nav_over.png');
		preloadFlag = true;
	}
}

function submitenter(myfield,e){
	var keycode;
	if (window.event) keycode = window.event.keyCode;
	else if (e) keycode = e.which;
	else return true;
	
	if (keycode == 13)  {
		document.login_form.submit();
		return false;
	} else {
		return true;
	}
}
