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_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function MM_openBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}
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_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];}
}



// PHONE SCRIPT FOR THE REQUEST FORM
function CombinePeriod () { 
var px = document.getElementById('prefix'); 
var no3 = document.getElementById('number3'); 
var no4 = document.getElementById('number4'); 
var ex = document.getElementById('ext'); 
var xx = ''; 

if ((ex.value.length==0) ||
   (ex.value==null)) {
     xx = ''
   }
   else { xx = 'x' }

var phone = + px.value + no3.value + no4.value + xx + ex.value; 
document.getElementById('phone').value=phone; 
//alert(document.Subscribe.getElementById('phone').value); 
} 
// PHONE SCRIPT FOR THE REQUEST FORM




function copyrightInfo(){
		var d=new Date();
		yr=d.getYear();
		if (yr < 100)
		yr = yr + 2000;
		else
		if (yr < 2000)
		yr = yr + 1900;
		document.write("<p class='caption'><img src='/images/bottom_div.gif' width='175' height='9'><br><br>&copy; "+yr+" Vendign Solutions    &nbsp;&nbsp;&nbsp;&nbsp;web services by <a href='http://www.jfdesigns.com'>JF Designs.com</a></p>");
}

function swapIt(id, newclass) { 
var selected_id = null; 
var dom = document.getElementById; 
	if (dom) { 
	if(selected_id != id) { 
	el = document.getElementById(id); 
	el.className = newclass; 
			} 
	} 
} 

  // this function toggles the status of a list
  function toggle(image,id,myCheckBox){
    var el=document.getElementById(id);
    if (el.className=="DisplayNone"){
      el.className="DisplayBlock";
      document.getElementById(image).src="images/down_arrow.gif";
      document.getElementById(image).alt="Close list";
	  document.myform[myCheckBox].checked = true; 
    }else{
      el.className="DisplayNone";
      document.getElementById(image).src="images/side_arrow.gif";
      document.getElementById(image).alt="Open list";
	  document.myform[myCheckBox].checked = false;
    }
  }
  
  function DoTheCheck(myCheckBox) {
if(document.myform[myCheckBox].checked == true)
  { document.myform[myCheckBox].checked = false}
  else
if(document.myform[myCheckBox].checked == false)
  {document.myform[myCheckBox].checked = true }
}
