function openit(){
window.open('contact.html','Form','top=1,left=1,width=800,height=575,toolbars=no');
}

var num_pics=5;
function get_header(){
	var RandomNum1;
	RandomNum1=Math.floor((num_pics)*Math.random()+1);
	var thumb = "media/interface/header"+RandomNum1 + ".jpg";
	document.write ("<img src='" + thumb + "' border='0'>");
}

function logos(){
var msg='';
//msg+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="150" height="75"><param name="movie" value="media/flash/memberalert.swf"><param name="quality" value="high"><embed src="media/flash/memberalert.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="150" height="75"></embed></object><br>';
msg+='<a href="https://www.itsme247.com/072" target="_blank"> <img src="http://promos.cuanswers.com/online_banking/badge_green.gif" alt="Online Banking Login" hspace="12" border="0" /> </a><br>';
msg+='<a href="corey_perks.html"><img src="media/corey_logo.jpg" width="150" height="170" border="0"></a><br>';
msg+='<a href="javascript:leaving(\'http://www.flu.gov\')"><img src="media/flu_gov.jpg" vspace="10" border="0"></a><br>';
//msg+='<a href="media/pdfs/flexpay.pdf" target="_blank"><img src="media/flex_pay.jpg" vspace="10" border="0"></a><br>';
msg+='<a href="javascript:leaving(\'http://www.scorecardrewards.com\')"><img src="media/score_card.jpg" vspace="0" border="0"></a><br>';
msg+='<a href="javascript:leaving(\'http://members.cunamutual.com/representatives/Rep.aspx?SITE=00600060&\')"><img src="media/members_i_i_logo.jpg" vspace="10" border="0"></a><br>';
msg+='<a href="javascript:leaving(\'http://www.cuservicecenter.com\')"><img src="media/cu_service.jpg" vspace="0" border="0"></a><br>';
msg+='<a href="javascript:leaving(\'http://www.co-opnetwork.org/public/consumers/find_atm/index.cfm\')"><img src="media/coop.jpg" vspace="10" border="0"></a><br>';
msg+='<a href="javascript:leaving(\'https://www.securesuite.net/efunds/registration/welcome.jsp?partner=1211178598cusaprcx34\')"><img src="media/mc_sc.jpg" vspace="0" border="0"></a><br>';
msg+='<a href="javascript:leaving(\'https://usa.visa.com/personal/secure_with_visa/verified_by_visa.html?ep=v_sym_verified\')"><img src="media/verified_visa.jpg" vspace="10" border="0"></a><br>';
msg+='<a href="va.html"><img src="media/vet_corner.jpg" vspace="0" border="0"></a><br>';
msg+='<table width="150" border="0" align="left" cellpadding="0" cellspacing="0">';
msg+='<tr><td><p align="center" class="smaller"><img src="media/eql_logo.gif"><br>Equal Opportunity Lender</p></td></tr>';
msg+='<tr><td><p align="center" class="smaller"><img src="media/ncua.jpg" vspace="5"><br>Share Insurance Questions?<br>Call 1-800-755-1030 ext. 1<br>8:00 a.m. – 6:30 p.m. EDT<br>Monday-Friday</p></td></tr>';
msg+='</table>';
msg+='<p>&nbsp;</p>';
document.write(msg);
}//end function

function footer(){
var now = new Date();
var year = now.getFullYear();
var start_year = 2007
var bus_name = "CorePlus Federal Credit Union";
if (start_year == year){
	document.write("Copyright &copy; "+bus_name+" "+start_year+"<br>");
	}
else {
	document.write("Copyright &copy; "+bus_name+" "+start_year+" - "+year+"<br>");
	}
}

function leaving(url){
	if(confirm("You are now leaving the CorePlus Federal Credit Union web site.\n\nWhen you click 'OK' you will be entering a website hosted by another party. Although CorePlus has provided this link you will no longer be subject to, or under the protection of the privacy and security policies of CorePlus Federal Credit Union’s website.\n\nWe encourage you to read and evaluate the privacy and security policies on the site you are entering, which may be different than those of CorePlus Federal Credit Union.\n\nCorePlus is not responsible for the content of the website you are entering.  CorePlus does not represent either party if transactions are entered into between the member and the other party website host.\n\nIf you would like to proceed click 'OK'. Click 'Cancel' to return to the CorePlus website"))
  	{
    		window.open(url, 'newWin');
  	}
}//end function

function mailquery(url)
{
  if(confirm("CorePlus FCU does not recommend the transmission of confidential information via e-mail."))
  {
    //window.open(url, 'newWin');
    window.location=url;
  }
}//end function

function truncate(number) 
{
	//Ensure number is treated as a string
	tempval=number + "";
	if (tempval!="0") 
	{
		start=tempval.indexOf('.');
		if (start==-1) 
		{
			start=tempval.length;  
			tempval=tempval + ".";
		}
		deccount=(tempval.length - start) - 1; 
		if (deccount >= 2) 
		{
			tempval=tempval.substring(0,start + 3);
		}
		else if (deccount==0) 
		{
			tempval=tempval + "00";
		}
		else 
			tempval=tempval + "0";
	}
	return (tempval);
}//end function

function parseout(varname,trunc) 
{
	i=0; 
	min=1;
	holder=varname;
	temp2=""; 
	pernum=0;
	if (holder.value!="") 
	{
		while ((i < holder.value.length) && 
			 (pernum < 2)) 
		{	  
			if (holder.value.charAt(i)=='.') 
			{
				pernum++;
				if (!trunc) 
				{
					pernum=2;
				}
			}
			if (pernum < 2) 
			{
				temp=holder.value.substring(i,i + 1);  
				if (((parseInt(temp)>=min) && (parseInt(temp)<=9) && (temp==parseInt(temp))) || (temp=='.')) 
				{ 
					temp2=temp2 + temp;
					min=0;
				} 
			}
			i++; 
		} // END WHILE
		if (temp2!="")
		{  
			if (trunc) 
			{
				holder.value=truncate(temp2);
			}
			else 
				holder.value=temp2;
			return (holder.value);
		}
		else 
		{
			holder.value=0;
			return(0);
		}
	} // END IF
	else 
	{
		holder.value=0;
		return(0);
	}
}//end function

function calculate () 
{
	calc=document.loanpay;
	loan=parseFloat(parseout(calc.loan,true));
	rate=parseFloat(parseout(calc.rate,true));
	months=parseFloat(parseout(calc.months,false));
	if ((rate==0) || (months==0)) 
	{
		if ((rate==0) && (months==0)) 
		{
			calc.payment.value=truncate(loan);
		}
		else if (rate==0) 
		{
			calc.payment.value=truncate(loan / months);
		}
		else 
			calc.payment.value=truncate(loan);
	}
	else 
	{
		payment=(loan * rate * Math.pow(1 + (rate / 1200),months)) / (1200 * (Math.pow(1 + (rate / 1200),months) - 1));
		calc.payment.value=truncate(payment);
	}
}//end function

function showlayer(name){
if (document.all) { //IS IE 4 or 5 (or 6 beta)
	document.all.Lending.style.visibility = "hidden";
	document.all.Marketing.style.visibility = "hidden";
	document.all.Mortgage.style.visibility = "hidden";
	document.all.Support.style.visibility = "hidden";
	eval( "document.all." + name + ".style.visibility = 'visibile'");
	}
else {
	document.getElementById(Lending).style.visibility = "hidden";
	document.getElementById(Marketing).style.visibility = "hidden";
	document.getElementById(Mortgage).style.visibility = "hidden";
	document.getElementById(Support).style.visibility = "hidden";
	temp = document.getElementById(name);
	temp.style.visibility = "visible";
	}
}//end function

function submitit1(){
var count=0;
if (document.form1.fm_name.value == ''){
	alert("Please enter your Name");
	count=1;
	}
if (document.form1.phonenum.value == ''){
	alert("Please enter your Phone Number");
	count=1;
	}
if (document.form1.email.value == ''){
	alert("Please enter your Email Address");
	count=1;
	}
if (count == 0){
	document.form1.submit();
	}
}//end submitit;

function submitit2(){
var count=0;
if (document.form2.fm_name.value == ''){
	alert("Please enter your Name");
	count=1;
	}
if (document.form2.phonenum.value == ''){
	alert("Please enter your Phone Number");
	count=1;
	}
if (document.form2.email.value == ''){
	alert("Please enter your Email Address");
	count=1;
	}
if (count == 0){
	document.form2.submit();
	}
}//end submitit2;

function submitit3(){
var count=0;
if (document.form3.fm_name.value == ''){
	alert("Please enter your Name");
	count=1;
	}
if (document.form3.phonenum.value == ''){
	alert("Please enter your Phone Number");
	count=1;
	}
if (document.form3.email.value == ''){
	alert("Please enter your Email Address");
	count=1;
	}
if (count == 0){
	document.form3.submit();
	}
}//end submitit3;

function submitit4(){
var count=0;
if (document.form4.fm_name.value == ''){
	alert("Please enter your Name");
	count=1;
	}
if (document.form4.phonenum.value == ''){
	alert("Please enter your Phone Number");
	count=1;
	}
if (document.form4.email.value == ''){
	alert("Please enter your Email Address");
	count=1;
	}
if (count == 0){
	document.form4.submit();
	}
}//end submitit4;

function submitit5(){
var count=0;
if (count == 0){
	document.form_survey.submit();
	}
}//end submitit5;

function closing(){
if (top.opener == null){
	history.go(-2);
	}
else {
	window.close();
	}
}
// Dreamweaver Functions
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_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
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_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

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 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];}}
}


