    function checkUserSave(f) {
        var mval = f.Login;
        if (mval.value.length > 0) {
	    var str1="Do you really want to SAVE " + mval.value + " ?";
            if (confirm(str1)) {
		return mval.value;
	    }
	    else {
		mval.value = "";
	    }
	    return;
	 }
    }

    function checkUserDelete(f) {
            var uval = f.Login;
            if (uval.value.length > 0) {
    	    	str2="Do you really want to DELETE " + uval.value + " ?";
                if (confirm(str2)) {
    			return uval.value;
    	    	}
    	    	else {
    			uval.value = "";
    	    	}
    	    	return;
    	    } else {
    	       	str2="No Login selected!";
	        if (confirm(str2)) {
	    		return uval.value;
	       	}
	       	else {
	    		uval.value = "";
	       	}
    	    	return;
    	    }

    }
    function checkUserLogout(f) {
            var ulval = "LOGOUT";
   	    str2="Do you really want to Logout " + " ?";
            if (confirm(str2)) {
   		return ulval.value;
    	    }
    	    else {
    		ulval.value = "";
    	    }
    	    return;
    }
    function checkUserEditAdd(f) {
                 var edval = f.Login;
                 if (edval.value.length <= 0) {
         	    	str2="No Login selected!";
                     if (confirm(str2)) {
         		return edval.value;
         	     } else {
         		edval.value = "";
         	     }
         	     return;
         	  }
    }
    function checkMatchInventory (f) {
                 var invNum = f.inventory_num;
                 var ordNum = f.order_number;
                 if (invNum.value < ordNum.value) {
         	   	  alert("invNum.value ordNum.value We are sorry, your order amount is not matched to our inventory!");
         	   	  ordNum.value = "";
         	   	  return;
         	  }
    }
    function checkUserPassword(f) {
                 var lgnval = f.login;
                 var pwdval = f.password;
                 var submval=f.SubmitLogin
                 if (lgnval.value.length <= 0 || pwdval.value.length <= 0) {
         	     alert("No login or password was entered!");
         	     submval.value="";
         	     return;
        	 }
    }

    function existusercheckout(f) {
                 var lgnval = f.login;
                 var pwdval = f.password;
                 var submval=f.SubmitExUserCheckOut
                 if (lgnval.value.length <= 0 || pwdval.value.length <= 0) {
         	     alert("No login or password was entered!");
         	     submval.value="";
         	     return;
        	 }
    }
 



    function popout(f) {
    	open.window('',this.f);
    }
    

function MM_swapImgRestore() {
  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_preloadImages() {
  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_findObj(n, d) {
  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_swapImage() {
  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_openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);

}


//Flash presentation

var imgUrl=new Array();
var imgLink=new Array();
var adNum=1;
imgUrl[1]="http://gecsoft.com/animation/mainpg.jpg";
imgLink[1]="http://gecsoft.com/index.php?page=products";
imgUrl[2]="http://gecsoft.com/animation/products.jpg";
imgLink[2]="http://gecsoft.com/index.php?page=products";
imgUrl[3]="http://gecsoft.com/animation/product2.jpg";
imgLink[3]="http://gecsoft.com/index.php?page=products";
imgUrl[4]="http://gecsoft.com/animation/cart.jpg";
imgLink[4]="http://gecsoft.com/index.php?page=order";
imgUrl[5]="http://gecsoft.com/animation/checkout.jpg";
imgLink[5]="http://gecsoft.com/index.php?page=products";
imgUrl[6]="http://gecsoft.com/animation/contactpg.jpg";
imgLink[6]="http://gecsoft.com/index.php?page=order";
imgUrl[7]="http://gecsoft.com/animation/signup.jpg";
imgLink[7]="http://gecsoft.com/index.php?page=products";
imgUrl[8]="http://gecsoft.com/animation/lookinfo.jpg";
imgLink[8]="http://gecsoft.com/index.php?page=products";
imgUrl[9]="http://gecsoft.com/animation/login.jpg";
imgLink[9]="http://gecsoft.com/index.php?page=order";
imgUrl[10]="http://gecsoft.com/animation/login2.jpg";
imgLink[10]="http://gecsoft.com/index.php?page=order";
imgUrl[11]="http://gecsoft.com/animation/login3.jpg";
imgLink[11]="http://gecsoft.com/index.php?page=products";
imgUrl[12]="http://gecsoft.com/animation/login4.jpg";
imgLink[12]="http://gecsoft.com/index.php?page=order";
imgUrl[13]="http://gecsoft.com/animation/userguide.jpg";
imgLink[13]="http://gecsoft.com/index.php?page=products";
imgUrl[14]="http://gecsoft.com/animation/webmanager.jpg";
imgLink[14]="http://gecsoft.com/index.php?page=order";
imgUrl[15]="http://gecsoft.com/animation/webmanager2.jpg";
imgLink[15]="http://gecsoft.com/index.php?page=products";
imgUrl[16]="http://gecsoft.com/animation/webmanager3.jpg";
imgLink[16]="http://gecsoft.com/index.php?page=order";
imgUrl[17]="http://gecsoft.com/animation/webmanager4.jpg";
imgLink[17]="http://gecsoft.com/index.php?page=products";
imgUrl[18]="http://gecsoft.com/animation/webmanager5.jpg";
imgLink[18]="http://gecsoft.com/index.php?page=order";
imgUrl[19]="http://gecsoft.com/animation/webmanager6.jpg";
imgLink[19]="http://gecsoft.com/index.php?page=products";
imgUrl[20]="http://gecsoft.com/animation/webmanager7.jpg";
imgLink[20]="http://gecsoft.com/index.php?page=order";


var piclength=imgUrl.length-1
//alert(piclength)

var imgPre=new Array();
var j=0;
for (i=1;i<=piclength;i++) {
	if( (imgUrl[i]!="") && (imgLink[i]!="") ) {
		j++;
	} else {
		break;
	}
}

function playTran(){
	if (document.all)
		imgInit.filters.revealTrans.play();
}

var key=0;
var theTimer=0

function nextAd(){
alert("j= " +j);
	if(adNum<j) adNum++ ;
	else adNum=1;

	if( key==0 ){
		key=1;
	} else if (document.all){
		imgInit.filters.revealTrans.Transition=19;
		imgInit.filters.revealTrans.apply();
		   playTran();

	}
	document.images.imgInit.src=imgUrl[adNum];
	theTimer=setTimeout("nextAd()", 4000);
}


function lastAd(){
	if(adNum>1)adNum-- ;
	else adNum=piclength;

	if( key==0 ){
		key=1;
	} else if (document.all){
		imgInit.filters.revealTrans.Transition=18;
		imgInit.filters.revealTrans.apply();
		   playTran();

	}
	document.images.imgInit.src=imgUrl[adNum];
	theTimer=setTimeout("lastAd()", 5000);
}


function nextpic(){

	clearTimeout(theTimer);

	if(adNum<j)
	     adNum++ ;
	else 
	     adNum=1;

	if( key==0 ){
		key=1;
	} else if (document.all){
		imgInit.filters.revealTrans.Transition=19;
		imgInit.filters.revealTrans.apply();
	        playTran();

	}
	document.images.imgInit.src=imgUrl[adNum];
	theTimer=setTimeout("nextAd()", 4000);
}



function stoppic(){
	 clearTimeout(theTimer)
	 //alert(theTimer)
}


function lastpic(){

	clearTimeout(theTimer);

	if(adNum>1)adNum-- ;
	else adNum=piclength;

	if( key==0 ){
		key=1;
	} else if (document.all){
		imgInit.filters.revealTrans.Transition=18;
		imgInit.filters.revealTrans.apply();
		   playTran();

	}
	document.images.imgInit.src=imgUrl[adNum];
	theTimer=setTimeout("lastAd()", 4000);
}


function goUrl(){
	var adNum =(adNum>0) ? adNum : 1;
	jumpUrl=imgLink[adNum];
	//jumpTarget='_blank';
        jumpTarget=''
	if (jumpUrl != ''){
		if (jumpTarget != '')
			window.open(jumpUrl,jumpTarget);
		else
			location.href=jumpUrl;
	}
}



