
//====================================================================================================
//	File Name		:	functions.js
//----------------------------------------------------------------------------------------------------
//	Purpose			:	Javascript Utility functions
//	Author			:	Nirmal Patel
//	Creation Date	:	05-May-2003
//	Copyright		:	Copyrights © 2003 Dot Infosys
//	Email			:	info@dotinfosys.com
//	History			:
//						Date						Author						Remark
//						05-May-2003					Nirmal Patel				Initial Release
//
//====================================================================================================

//====================================================================================================
//	Function Name	:	popupWindowURL
//	Purpose			:	Whenever you wanna open a link into a new window just call this function
//								you need to pass some arguemnts as described below.
//	Parameters		:	
//								url  = url to be open in the new window
//								winname = winname is the window name for the reference of that window
//								w is the width
//								h is the height
//								menu is the parameter, if you want menubar to be enabled on the window
//								resize if you wanna resize the window
//								scroll i fyou needed
//								x and y are the co-ordinates where you wld like to show the window on the screen
//	Return			:	true or false
//	Author			:	Nirmal Patel
//	Creation Date	:	05-May-2003
//----------------------------------------------------------------------------------------------------

function popupWindowURL(url, winname,  w, h, menu, resize, scroll, x, y) {
	if (winname == null) winname = "newWindow";
	if (w == null) w = 600;
	if (h == null) h = 600;
	if (resize == null) resize = 1;
	
	menutype   = "nomenubar";
	resizetype = "noresizable";
	scrolltype = "noscrollbars";
	if (menu) menutype = "menubar";
	if (resize) resizetype = "resizable";
	if (scroll) scrolltype = "scrollbars";
	
	if (x == null || y == null) {
		cwin=window.open(url,winname,"status," + menutype + "," + scrolltype + "," + resizetype + ",width=" + w + ",height=" + h);
	}
	else {
		cwin=window.open(url,winname,"top=" + y + ",left=" + x + ",screenX=" + x + ",screenY=" + y + "," + "status," + menutype + "," + scrolltype + "," + resizetype + ",width=" + w + ",height=" + h);
	}
	if (!cwin.opener) cwin.opener=self;
	cwin.focus();
	
	return true;
}



var message="FIND YOUR OWN IMAGES."; 
// Don't edit below!
function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;

<!--
/* 
No Right Click. Written by PerlScriptsJavaScripts.com
Copyright http://www.perlscriptsjavascripts.com 
Free and commercial Perl and JavaScripts     
*/

isNN = document.layers ? 1 : 0; 

function noContext(){return false;}

function noContextKey(e) {
    if(isNN){
        if (e.keyCode == 96){ return (false);}
    } else {
        if (event.keyCode == 96){ return (false);}
    }
}

function noClick(e){
    if(isNN){
        if(e.which > 1) {return false;}
    } else { 
        if(event.button > 1){return false;}
    }
}

if(isNN){ 
    document.captureEvents(Event.MOUSEDOWN);
}

document.oncontextmenu = noContext;
document.onkeypress    = noContextKey;
document.onmousedown   = noClick;
document.onmouseup     = noClick;

// -->


function disabletext(e){
return false
}

function reEnable(){
return true
}

//if the browser is IE4+
document.onselectstart=new Function ("return false")

//if the browser is NS6
if (window.sidebar){
document.onmousedown=disabletext
document.onclick=reEnable
}

<!--

        var bDoesAll = (null != document.all)

        if (bDoesAll) {
                document.styleSheets[0].addRule(".clsBlurb","display:none;")
        }
 function tomo_valores() {
 

     Precio = reversePurchase.PURCH_PRICE2.value;
     
     if (Precio == 0 | null) {
    alert("El precio del vehículo no es válido");
    return false;
     }
     else {
     autos.precio_venta1.value = reversePurchase.PURCH_PRICE2.value;
     preciov = autos.precio_venta1.value;
     return preciov;
     }
    
  }
 
 
function tomo_valores1() {

	
    calculo.Precio.value = parseInt(reversePurchase.PURCH_PRICE2.value);
    Precio = reversePurchase.PURCH_PRICE2.value;
    
    if (Precio == 0 | null) {
    alert("El precio del vehículo no es válido");
    return false;
     }
     else {
     return;
     }

    
 }
 
function calcula_interes() {
     
     Mes = reversePayment.LOANTERM1.value
     
          
     if (Mes == 12){
     reversePayment.INTRATE1.value = 27;
     return;
          }
     else {
     if (Mes == 18){
     reversePayment.INTRATE1.value = 28;
     return;
          }
     else {
     if (Mes == 24){
     
     reversePayment.INTRATE1.value = 29;
     return;
          }
     else {
if (Mes == 36){
     reversePayment.INTRATE1.value = 30;
     return;
          }
      return;
     }
     }
     }
               
     
     }
     
     function calcula_interes1() {
     var interes 
     var Mes = reversePurchase.LOANTERM2.value
          
     if (Mes == 12){
     interes = 27;
     reversePurchase.INTRATE2.value = interes;
     return interes;
          }
     else {
     if (Mes == 18){
    interes = 28;
     reversePurchase.INTRATE2.value = interes;
        return interes;
          }
     else {
     if (Mes == 24){
    interes = 29;
     reversePurchase.INTRATE2.value = interes;
     return interes;
          }
     else {
if (Mes == 36){
    interes = 30;
     reversePurchase.INTRATE2.value = interes;
       return interes;
          }
      return;
     }
     }
     }
               
     
     }

  function document_mouseover() {
    var eSrc = window.event.srcElement ;
    if (eSrc.className == "clsHeader") {
      document.all(eSrc.id).style.color= "#FFCC66"
    }
	if (eSrc.className == "clsHeader2") {
      document.all(eSrc.id).style.color= "#FFCC66"
    }
	if (eSrc.className == "topic") {
      document.all(eSrc.id).style.color= "#FFCC66"
    }
  }

  function document_mouseout() {
    var eSrc = window.event.srcElement ;
    if (eSrc.className == "clsHeader") {
      document.all(eSrc.id).style.color= "#FFFFFF"
    }
	if (eSrc.className == "clsHeader2") {
      document.all(eSrc.id).style.color= "#FFFFFF"
    }
	if (eSrc.className == "topic") {
      document.all(eSrc.id).style.color= "#FFFFFF"
    }
  }

        function return_false() {
                window.event.returnValue = false
        }

        if (bDoesAll) {
                document.onmouseover = document_mouseover
                document.onmouseout = document_mouseout
                document.onselectstart = return_false
        }




	
//-->

<!--

//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

var message="FIND YOUR OWN IMAGES.";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// --> 
