﻿function ClearText(control, strOriginalText)
{
    if (control.value == strOriginalText)
    {
	    control.value = "";
	}
}
			
function RestoreText(control, strOriginalText)
{
	if (Trim(control.value) == "")
	{
		control.value = strOriginalText;
	}
}

// Removes leading whitespaces
function LTrim( value ) 
{	
	var re = /\s*((\S+\s*)*)/;
	return value.replace(re, "$1");	
}

// Removes ending whitespaces
function RTrim( value ) 
{	
	var re = /((\s*\S+)*)\s*/;
	return value.replace(re, "$1");	
}

// Removes leading and ending whitespaces
function Trim( value ) 
{	
	return LTrim(RTrim(value));	
}

function DisplayErrorViaMessageBox(errorList)
{ 
    if ( errorList != '' )
    {    
        var result = errorList;          
        var errorArray = errorList.split("|");
        if ( errorArray.length > 1 )
        {
            result = '';
            var counter = 0;
            while( counter < errorArray.length)
            {
                result = result + errorArray[counter] + "\n\n";
                counter += 1;
            }
        }        
        alert(result);
    }
}   

function IsNumeric(sText)
{
   var ValidChars = "0123456789";
   var IsNumber=true;
   var Char;
    
   for (i = 0; i < sText.length && IsNumber == true; i++) 
   { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
      {
         IsNumber = false;
      }
   }
   return IsNumber;   
}

function IsMoney(sText)
{
   var ValidChars = "0123456789.";
   var IsNumber=true;
   var Char;
    
   for (i = 0; i < sText.length && IsNumber == true; i++) 
   { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
      {
         IsNumber = false;
      }
   }
   return IsNumber;   
}

function VerifyZipCode(textboxId)
{
    zipEntered = document.getElementById(textboxId).value
    if ( zipEntered.length != 5 || !IsNumeric(zipEntered) )    
    {
        alert('Please enter a valid 5 digit zip code');
        return false;
    }
    else
    {
       return true;
    }
}


function VerifyZipCodeAndMake(dropdownMakeId, textboxId)
{

    var error = "";
     makeEntered = document.getElementById(dropdownMakeId).value
    if ( makeEntered=="any" )    
    {
        error = "Make is a required field";
    }

    zipEntered = document.getElementById(textboxId).value
    if ( zipEntered.length != 5 || !IsNumeric(zipEntered) )    
    {
        if(error != "") error = error + "\n";
        error = error + "Please enter a valid 5 digit zip code"
    }
    
    if(error != "")
    {
      alert(error);
      return false;
    }
    else
    {
       return true;
    }
}


function IsZipCodeValid(zipEntered)
{
    if ( zipEntered.length != 5 || !IsNumeric(zipEntered) )    
    {
        return false;
    }
    else
    {
       return true;
    }
}

function IsSocialSecurityValid(ssnEntered)
{
    ssnEntered = ssnEntered.replace(/ /g, "")
    ssnEntered = ssnEntered.replace(/-/g, "")
    if ( ssnEntered.length != 9 || !IsNumeric(ssnEntered) )    
    {
        return false;
    }
    else
    {
       return true;
    }
}

function ClickedDefaultButton(e, buttonid)
{ 
      var bt = document.getElementById(buttonid); 
      if (typeof bt == 'object')
      { 
            if(navigator.appName.indexOf("Netscape")>(-1))
            { 
                  if (e.keyCode == 13)
                  { 
                        bt.click(); 
                        return false; 
                  } 
            } 
            if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1))
            { 
                  if (event.keyCode == 13)
                  { 
                        bt.click(); 
                        return false; 
                  } 
            } 
      } 
} 

function IsPhoneValid(phone)
{
    phone = Trim(phone);
    var i;
    var count = 0;
    for (i = 0; i < phone.length; i++)
    {   
        // Check that current character is number, ignore spaces.
        var c = phone.charAt(i);
        if (!( c == ' ' || c == '(' || c == ')' || c== '-' || c == '.' ))
        {
            if ( c < "0" || c > "9" ) return false;
            count++;
        }
    }
    
    if ( count == 10 )
        return true;
    else
        return false;
}



function IsEmailValid(str) 
{
	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)

	if (str.indexOf(at)==-1)
	   return false

	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr)
	   return false

	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr)
	   return false

	 if (str.indexOf(at,(lat+1))!=-1)
	   return false

	 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot)
	   return false

	 if (str.indexOf(dot,(lat+2))==-1)
	   return false
	
	 if (str.indexOf(" ")!=-1)
	   return false

	 return true					
}

<!-- Original:  Sandeep V. Tamhankar (stamhankar@hotmail.com) -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
function isDateValid(dateStr) 
{
    // Checks for the following valid date formats:
    // MM/DD/YY   MM/DD/YYYY   MM-DD-YY   MM-DD-YYYY
    // Also separates date into month, day, and year variables

    var datePat = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{2}|\d{4})$/;

    // To require a 4 digit year entry, use this line instead:
    // var datePat = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{4})$/;

    var matchArray = dateStr.match(datePat); // is the format ok?
    if (matchArray == null) 
    {
        //alert("Date is not in a valid format.")
        return false;
    }
    month = matchArray[1]; // parse date into variables
    day = matchArray[3];
    year = matchArray[4];
    if (month < 1 || month > 12) 
    { 
        // check month range
        //alert("Month must be between 1 and 12.");
        return false;
    }
    if (day < 1 || day > 31) 
    {
        //alert("Day must be between 1 and 31.");
        return false;
    }
    if ((month==4 || month==6 || month==9 || month==11) && day==31) 
    {
        //alert("Month "+month+" doesn't have 31 days!")
        return false
    }
    if (month == 2) 
    { 
        // check for february 29th
        var isleap = (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0));
        if (day>29 || (day==29 && !isleap)) 
        {
            //alert("February " + year + " doesn't have " + day + " days!");
            return false;
        }
    }
    return true;  // date is valid
}

function compareDates (value1, value2) 
{
   var date1, date2;
   var month1, month2;
   var year1, year2;

   month1 = value1.substring (0, value1.indexOf ("/"));
   date1 = value1.substring (value1.indexOf ("/")+1, value1.lastIndexOf ("/"));
   year1 = value1.substring (value1.lastIndexOf ("/")+1, value1.length);

   month2 = value2.substring (0, value2.indexOf ("/"));
   date2 = value2.substring (value2.indexOf ("/")+1, value2.lastIndexOf ("/"));
   year2 = value2.substring (value2.lastIndexOf ("/")+1, value2.length);

   if (parseInt(year1) > parseInt(year2)) return 1;
   else if (parseInt(year1) < parseInt(year2)) return -1;
   else if (parseInt(month1) > parseInt(month2)) return 1;
   else if (parseInt(month1) < parseInt(month2)) return -1;
   else if (parseInt(date1) > parseInt(date2)) return 1;
   else if (parseInt(date1) < parseInt(date2)) return -1;
   else return 0;
} 

function findPosX(obj) 
{
    var curleft = 0;
    if (obj.offsetParent) 
    {
        while (1) 
        {
            curleft+=obj.offsetLeft;
            if (!obj.offsetParent) 
            {
                break;
            }
            obj=obj.offsetParent;
        }
    } 
    else if (obj.x) 
    {
        curleft+=obj.x;
    }
    return curleft;
}

function findPosY(obj) 
{
    var curtop = 0;
    if (obj.offsetParent) 
    {
        while (1) 
        {
            curtop+=obj.offsetTop;
            if (!obj.offsetParent) 
            {
                break;
            }
            obj=obj.offsetParent;
        }
    } 
    else if (obj.y) 
    {
        curtop+=obj.y;
    }
    return curtop;
}

function AttachEventToListener(obj, eventname, eventhandler){
    //Used to attach an event to an event handler.    

    if(obj.addEventListener){
	 if(eventname.substring(0, 2)=="on")
		eventname = eventname.substring(2, eventname.length+1);
         obj.addEventListener(eventname, eventhandler, false);
    }
    else  
    {
        if(obj.attachEvent)
            obj.attachEvent(eventname, eventhandler);
    }
}

function IsFireFox(){
    var strUserAgent = navigator.userAgent.toString();

    if(navigator.userAgent.indexOf("Firefox")!=-1){
    var versionindex=navigator.userAgent.indexOf("Firefox")+8
    if (parseInt(navigator.userAgent.charAt(versionindex))>=1)
            return true;
    else
            return false;
    }
}

function IsInternetExplorer(){
    var strUserAgent = navigator.appName.toString();
    if (strUserAgent == "Microsoft Internet Explorer")
        return true;
    else
        return false;
}

function getcookie(cookiename) {
 var cookiestring=""+document.cookie;
 var index1=cookiestring.indexOf(cookiename);
 if (index1==-1 || cookiename=="") return ""; 
 var index2=cookiestring.indexOf(';',index1);
 if (index2==-1) index2=cookiestring.length; 
 return unescape(cookiestring.substring(index1+cookiename.length+1,index2));
}

function pauseDelay(milliseconds) 
{
    var date = new Date();
    var curDate = null;
    do { curDate = new Date(); } 
    while(curDate-date < milliseconds);
}

function showPopUpObj(objNextTo, objToPlace, posX, posY)
{
    var InfoObj = document.getElementById(objToPlace);
    InfoObj.style.visibility = 'visible';

    InfoObj.style.left = (findPosX(objNextTo) + posX) + 'px';
    InfoObj.style.top =  (findPosY(objNextTo) + posY) + 'px';
}

function showPopUpObjAtPos(objToPlace, posX, posY)
{
    var InfoObj = document.getElementById(objToPlace);
    InfoObj.style.display = 'block';

    InfoObj.style.left = posX + 'px';
    InfoObj.style.top =  posY + 'px';
}

function hidePopUpObj(infoObjName)
{
    certInfoObj = document.getElementById(infoObjName);
    certInfoObj.style.display = 'none';
}

// This function formats numbers by adding commas
function numberFormat(nStr,prefix)
{
    var prefix = prefix || '';
    nStr += '';
    x = nStr.split('.');
    x1 = x[0];
    x2 = x.length > 1 ? '.' + x[1] : '';
    var rgx = /(\d+)(\d{3})/;
    while (rgx.test(x1))
        x1 = x1.replace(rgx, '$1' + ',' + '$2');
    
    return prefix + x1 + x2;
}

//Gets a querystring value
//default_ can be passed in as the default value if there is no value available
function getQuerystring(key, default_)
{
  if (default_==null) default_=""; 
  key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regex = new RegExp("[\\?&]"+key+"=([^&#]*)");
  var qs = regex.exec(window.location.href);
  if(qs == null)
    return default_;
  else
    return qs[1];
}

// Log page view and Events///
function logJSWebPageViewEvent ()
{

    this.WEB_LOG_browser = new String("");
    this.WEB_LOG_channel = new String("");
    this.WEB_LOG_dealer_number = new String("");
    this.WEB_LOG_detail_number = new String("");
    this.WEB_LOG_leg_model_id = new String("");
    this.WEB_LOG_make_number = new String("");
    this.WEB_LOG_pa1 = new String("");
    this.WEB_LOG_pa2 = new String("");
    this.WEB_LOG_pa3 = new String("");
    this.WEB_LOG_pa4 = new String("");
    this.WEB_LOG_pa5 = new String("");
    this.WEB_LOG_pa6 = new String("");
    this.WEB_LOG_qs = new String("");
    this.WEB_LOG_ra1 = new String("");
    this.WEB_LOG_ra2 = new String("");
    this.WEB_LOG_ra3 = new String("");
    this.WEB_LOG_ra4 = new String("");
    this.WEB_LOG_ra5 = new String("");
    this.WEB_LOG_ra6 = new String("");
    this.WEB_LOG_referrer_number = new String("");
    this.WEB_LOG_referrer_page = new String("");
    this.WEB_LOG_remote_ip = new String("");
    this.WEB_LOG_server_ip = new String("");
    this.WEB_LOG_session_number = new String("");
    this.WEB_LOG_site_name = new String("");
    this.WEB_LOG_sub_channel = new String("");
    this.WEB_LOG_sub_page = new String("");
    this.WEB_LOG_user_number = new String("");
    this.WEB_LOG_vehicle_number = new String("");
    this.WEB_LOG_year = new String("");
    this.WEB_LOG_zip = new String("");
    this.WEB_LOG_HasErrors = new String("");
    this.WEB_LOG_ItemArray = new String("");
    this.WEB_LOG_RowError = new String("");
    this.WEB_LOG_RowState = new String("");
    this.WEB_LOG_Table = new String("");
    this.WEB_LOG_timestamp = new String("");
    this.WEB_LOG_server_number = new String("");
    this.WEB_LOG_weblog_id = new String("");

     
    
    
    this.buildQueryString = function(page, subPage, eventType, event_data_1, event_data_2, app){
        this.logJsWebPageViewEventURI = new String("/Handler/WebLogWriter.ashx?LogData={");
        this.logJsWebPageViewEventUrl = new String("");
    
        if ((typeof this.WEB_LOG_browser != 'undefined') && (this.WEB_LOG_browser != ""))
            this.logJsWebPageViewEventUrl += '"browser":"' + this.WEB_LOG_browser + '",';
            
        if ((typeof this.WEB_LOG_channel != 'undefined') && (this.WEB_LOG_channel != ""))
            this.logJsWebPageViewEventUrl += '"channel":"' + this.WEB_LOG_channel + '",';
            
        if ((typeof this.WEB_LOG_dealer_number != 'undefined') && (this.WEB_LOG_dealer_number != ""))
            this.logJsWebPageViewEventUrl += '"dealer_number":"' + this.WEB_LOG_dealer_number + '",';
            
        if ((typeof this.WEB_LOG_detail_number != 'undefined') && (this.WEB_LOG_detail_number != ""))
            this.logJsWebPageViewEventUrl += '"detail_number":"' + this.WEB_LOG_detail_number + '",';
            
        if ((typeof this.WEB_LOG_leg_model_id != 'undefined') && (this.WEB_LOG_leg_model_id != ""))
            this.logJsWebPageViewEventUrl += '"leg_model_id":"' + this.WEB_LOG_leg_model_id + '",';
            
        if ((typeof this.WEB_LOG_make_number != 'undefined') && (this.WEB_LOG_make_number != ""))
            this.logJsWebPageViewEventUrl += '"make_number":"' + this.WEB_LOG_make_number + '",';
            
        if ((typeof this.WEB_LOG_pa1 != 'undefined') && (this.WEB_LOG_pa1 != ""))
            this.logJsWebPageViewEventUrl += '"pa1":"' + this.WEB_LOG_pa1 + '",';
            
        if ((typeof this.WEB_LOG_pa2 != 'undefined') && (this.WEB_LOG_pa2 != ""))
            this.logJsWebPageViewEventUrl += '"pa2":"' + this.WEB_LOG_pa2 + '",';
            
        if ((typeof this.WEB_LOG_pa3 != 'undefined') && (this.WEB_LOG_pa3 != ""))
            this.logJsWebPageViewEventUrl += '"pa3":"' + this.WEB_LOG_pa3 + '",';
            
        if ((typeof this.WEB_LOG_pa4 != 'undefined') && (this.WEB_LOG_pa4 != ""))
            this.logJsWebPageViewEventUrl += '"pa4":"' + this.WEB_LOG_pa4 + '",';
            
        if ((typeof this.WEB_LOG_pa5 != 'undefined') && (this.WEB_LOG_pa5 != ""))
            this.logJsWebPageViewEventUrl += '"pa5":"' + this.WEB_LOG_pa5 + '",';
            
        if ((typeof this.WEB_LOG_pa6 != 'undefined') && (this.WEB_LOG_pa6 != ""))
            this.logJsWebPageViewEventUrl += '"pa6":"' + this.WEB_LOG_pa6 + '",';
        
        if ((typeof this.WEB_LOG_qs != 'undefined') && (this.WEB_LOG_qs != ""))
            this.logJsWebPageViewEventUrl += '"qs":"' + this.WEB_LOG_qs + '",';
        
        if ((typeof this.WEB_LOG_ra1 != 'undefined') && (this.WEB_LOG_ra1 != ""))
            this.logJsWebPageViewEventUrl += '"ra1":"' + this.WEB_LOG_ra1 + '",';
        
        if ((typeof this.WEB_LOG_ra2 != 'undefined') && (this.WEB_LOG_ra2 != ""))
            this.logJsWebPageViewEventUrl += '"ra2":"' + this.WEB_LOG_ra2 + '",';
        
        if ((typeof this.WEB_LOG_ra3 != 'undefined') && (this.WEB_LOG_ra3 != ""))
            this.logJsWebPageViewEventUrl += '"ra3":"' + this.WEB_LOG_ra3 + '",';
        
        if ((typeof this.WEB_LOG_ra4 != 'undefined') && (this.WEB_LOG_ra4 != ""))
            this.logJsWebPageViewEventUrl += '"ra4":"' + this.WEB_LOG_ra4 + '",';
        
        if ((typeof this.WEB_LOG_ra5 != 'undefined') && (this.WEB_LOG_ra5 != ""))
            this.logJsWebPageViewEventUrl += '"ra5":"' + this.WEB_LOG_ra5 + '",';
        
        if ((typeof this.WEB_LOG_ra6 != 'undefined') && (this.WEB_LOG_ra6 != ""))
            this.logJsWebPageViewEventUrl += '"ra6":"' + this.WEB_LOG_ra6 + '",';
        
        if ((typeof this.WEB_LOG_referrer_number != 'undefined') && (this.WEB_LOG_referrer_number != ""))
            this.logJsWebPageViewEventUrl += '"referrer_number":"' + this.WEB_LOG_referrer_number + '",';
        
        if ((typeof this.WEB_LOG_referrer_page != 'undefined') && (this.WEB_LOG_referrer_page != ""))
            this.logJsWebPageViewEventUrl += '"referrer_page":"' + this.WEB_LOG_referrer_page + '",';
        
        if ((typeof this.WEB_LOG_remote_ip != 'undefined') && (this.WEB_LOG_remote_ip != ""))
            this.logJsWebPageViewEventUrl += '"remote_ip":"' + this.WEB_LOG_remote_ip + '",';
        
        if ((typeof this.WEB_LOG_server_ip != 'undefined') && (this.WEB_LOG_server_ip != ""))
            this.logJsWebPageViewEventUrl += '"server_ip":"' + this.WEB_LOG_server_ip + '",';
        
        if ((typeof this.WEB_LOG_session_number != 'undefined') && (this.WEB_LOG_session_number != ""))
            this.logJsWebPageViewEventUrl += '"session_number":"' + this.WEB_LOG_session_number + '",';
        
        if ((typeof this.WEB_LOG_site_name != 'undefined') && (this.WEB_LOG_site_name != ""))
            this.logJsWebPageViewEventUrl += '"site_name":"' + this.WEB_LOG_site_name + '",';
        
        if ((typeof this.WEB_LOG_sub_channel != 'undefined') && (this.WEB_LOG_sub_channel != ""))
            this.logJsWebPageViewEventUrl += '"sub_channel":"' + this.WEB_LOG_sub_channel + '",';
        
        if ((typeof this.WEB_LOG_sub_page != 'undefined') && (this.WEB_LOG_sub_page != ""))
            this.logJsWebPageViewEventUrl += '"sub_page":"' + this.WEB_LOG_sub_page + '",';
        
        if ((typeof this.WEB_LOG_user_number != 'undefined') && (this.WEB_LOG_user_number != ""))
            this.logJsWebPageViewEventUrl += '"user_number":"' + this.WEB_LOG_user_number + '",';
        
        if ((typeof this.WEB_LOG_vehicle_number != 'undefined') && (this.WEB_LOG_vehicle_number != ""))
            this.logJsWebPageViewEventUrl += '"vehicle_number":"' + this.WEB_LOG_vehicle_number + '",';
        
        if ((typeof this.WEB_LOG_year != 'undefined') && (this.WEB_LOG_year != ""))
            this.logJsWebPageViewEventUrl += '"year":"' + this.WEB_LOG_year + '",';
        
        if ((typeof this.WEB_LOG_zip != 'undefined') && (this.WEB_LOG_zip != ""))
            this.logJsWebPageViewEventUrl += '"zip":"' + this.WEB_LOG_zip + '",';
        
        this.logJsWebPageViewEventUrl += '"page":"' + page + '",';
        this.logJsWebPageViewEventUrl += '"data1":"' + event_data_1 + '",';
        this.logJsWebPageViewEventUrl += '"data2":"' + event_data_2 + '",';
        this.logJsWebPageViewEventUrl += '"HasErrors":"' + this.WEB_LOG_HasErrors + '",';
        this.logJsWebPageViewEventUrl += '"ItemArray":"' + this.WEB_LOG_ItemArray + '",';
        this.logJsWebPageViewEventUrl += '"RowError":"' + this.WEB_LOG_RowError + '",';
        this.logJsWebPageViewEventUrl += '"RowState":"' + this.WEB_LOG_RowState + '",';
        this.logJsWebPageViewEventUrl += '"Table":"' + this.WEB_LOG_Table + '",';
        this.logJsWebPageViewEventUrl += '"timestamp":"' + this.WEB_LOG_timestamp + '",';
        this.logJsWebPageViewEventUrl += '"server_number":"' + this.WEB_LOG_server_number + '",';
        this.logJsWebPageViewEventUrl += '"weblog_id":"' + this.WEB_LOG_weblog_id + '"';
        this.logJsWebPageViewEventUrl += '}';
    
        this.logJsWebPageViewEventUrl = escape(this.logJsWebPageViewEventUrl);

        this.logJsWebPageViewEventURI += this.logJsWebPageViewEventUrl;
        
        if (eventType != '')
            this.logJsWebPageViewEventURI += "&Event=" + eventType;
            
        if (app != '')
            this.logJsWebPageViewEventURI += "&App=" + app;
    
    }
    
    this.logEvent = function(page, subPage, eventType, event_data_1, event_data_2, app){
        this.buildQueryString(page, subPage, eventType, event_data_1, event_data_2, app);
        var myWebLogImg = new Image(1,1);
        myWebLogImg.src = this.logJsWebPageViewEventURI;
        myWebLogImg.onload = function() { doNothing(1); }
        
    }
//    var myWebLogImg = new Image(1,1);
//    myWebLogImg.src = logJsWebPageViewEventURI;
//    myWebLogImg.onload = function() { doNothing(1); }
}

function changeKBBStateOfItem(state)
{
    var lblStateChange = document.getElementById('spanState');
    lblStateChange.innerHTML = " for " + state;
}

function MakeModelTrimActivate(SelectDropDown, ActivateDropDown)
{
    var selectDropDown = document.getElementById(SelectDropDown);
    var activateDropDown = document.getElementById(ActivateDropDown);
    
    if (selectDropDown.selectedIndex != 0)
        activateDropDown.removeAttribute('disabled');
    else
        activateDropDown.setAttribute('disabled','disabled');
}


//CPO Image Functions

function CPOImageVals ()
{
    this.offSetLeft = new Number(0);
    this.offSetTop = new Number(0);
    this.CPOProgramId = new Number(-1);
}

function getCPOData(strCPOId)
{

    var getCPOURL = "/Handler/GetCPOInfo.ashx";
    //jQuery.get( url, [data], [callback], [type] )
    if (strCPOId > 0)
    {
        $.get(getCPOURL, {cpoId: strCPOId}, function(cpoData){
                    $("#cpoTextContent").html($(cpoData).find("#cpoInfo").html());
                    
                    if ($(cpoData).find("#cpoInfoDetails").html() != "")
                    {
                        $("#expandCpoDetails").css({'display':'block'});
                        $("#cpoTextDetailsContent").html($(cpoData).find("#cpoInfoDetails").html());
                        $("#cpoTextDetails").css({'display':'none'});
                    }
                    else
                    {
                        $("#expandCpoDetails").css({'display':'none'});
                        $("#cpoTextDetails").css({'display':'none'});
                    }
                  });
    }
}
        
function doNothing(myVar)
{
;
}