// address.js, included from checkout 
var prevcity = '';
var prevstate = '';
var prevzipcode = '';
var prevcounty = '';

function submitCommonAddressForm(addressForm, checkCountryEnabled) { 

	if (addressForm.address1.value == ""){
		if (addressForm.address2.value != ""){
			addressForm.address1.value = addressForm.address2.value;
			addressForm.address2.value = "";
		}
	} 
	   
	var tempDayExt = addressForm.ext1.value; 
	addressForm.dExt.value = tempDayExt;
    var tempEveExt = addressForm.ext2.value;
	addressForm.eExt.value = tempEveExt;

	var retVal = validateAddress(addressForm, checkCountryEnabled);
	
	if (retVal == 0 ) { 
		addressForm.dphone.value = addressForm.day1.value;
		addressForm.ephone.value = addressForm.eve1.value;
		addressForm.phone1.value = addressForm.dphone.value+"#"+addressForm.dExt.value;
		addressForm.phone2.value = addressForm.ephone.value+"#"+addressForm.eExt.value;
		
		if (! addressForm.addressId) {
			// can't update nickname

			 addressForm.nickName.value = Date();   

		} 
		
	   	if (addressForm.county) {
	    	prevcounty = addressForm.county.value;
    	}
		
		var editstatus = 0;
	   	/*Universal Chnge*/
	   	if(prevcity != addressForm.city.value ||
        	prevzipcode != addressForm.zipCode.value ||
        	prevstate != document.getElementById("addressState").value ) {

        	prevcity = addressForm.city.value;
        	prevzipcode = addressForm.zipCode.value;
        	prevstate = document.getElementById("addressState").value;
        	editstatus = 1;
        }
        /*Universal Chnge end*/

        // Pre Approval- start
       if(document.getElementById("billingAddressCheckBox")!=null && document.getElementById("billingAddressCheckBox").checked){
			addressForm.URL.value = addressForm.URLTemp.value+'&billingAddressCheck=Y';
			if(document.getElementById('billingAddressCheck')){
				document.getElementById('billingAddressCheck').value = 'Y';
			}
		}else{
			if(addressForm.URLTemp)
				addressForm.URL.value=addressForm.URLTemp.value;
		}
        // Pre Approval- end              
        if(retVal == 0 && editstatus == 1) {
        	ajaxCallForAddress(addressForm, false);
        }
        else if (retVal == 0 && editstatus == 0) {
        	// clear any errors and resubmit validation
        	// automatically post the address if valid address
        	document.getElementById("errorMsg2").innerHTML = '';
       		ajaxCallForAddress(addressForm, true);
        }
	}
	else{
		window.scrollTo(1,1);
	}	
}

function fnValidatePhone(phoneNumber) {
	var temp = "";
	temp = phoneNumber;
	var firstDigit= temp.substring(0,1);
    var numeric = fnIsNumeric(temp);
	if (!numeric){
    	return false;
	}
	else  if(temp.length >= 12 || temp.length < 10) {
  		return false;
    }  
  
  	else if (temp.length == 10 )
  	{
   		if((firstDigit == 0 || firstDigit == 1))  
     	{
     		return false;;
    	}
      	return true;
  	}
 	else if (temp.length == 11  )
  	{
  		if((firstDigit == 0 || firstDigit == 1))  
      	{
  			var ch = temp.charAt(1);
  			if(ch == 0 || ch == 1)
   			{       
    	  			return false;
  			}
 		}
 		return true;
 	} 
}
function ajaxCallForAddress(addressForm, submitOnSuccess) {
	document.getElementById("AJAXload2").style.display = '';
	document.getElementById("AJAXload1").style.display = '';
	document.getElementById("AJAXload").style.display = '';
    
     var urlString='';
    var provinceVal=''; 
	var postalCode='';
    var cntryval = 'US';

    // check country code, this loops through each radio button 
    // (even hidden ones on shipping and delivery page
    for (var i=0; i < addressForm.country.length; i++) {
	   	if (addressForm.country[i].checked) {
	    	cntryval = addressForm.country[i].value;
    	}
	}
	if (cntryval=='CA') {
		provinceVal = addressForm.province.value;
		postalCode = addressForm.postalCode.value;
	}
    
    urlString=urlString+"city"+"="+addressForm.city.value;
    urlString=urlString+"&zipCode"+"="+addressForm.zipCode.value;
    urlString=urlString+"&state"+"="+addressForm.state.value;
    urlString=urlString+"&address2"+"="+addressForm.address2.value; 
    urlString=urlString+"&address1"+"="+addressForm.address1.value; 
      
	urlString=urlString+"&country"+"="+cntryval;
    if (cntryval=='CA') {
    	urlString=urlString+"&province"+"="+provinceVal;
        urlString=urlString+"&postalCode"+"="+postalCode;
    }
    urlString=urlString+"&pageValue"+"="+addressForm.pageValue.value;  
    urlString=urlString+"&editAddMode"+"="+addressForm.editAddMode.value;
    
    
    var url = "HandleAddressCmd";
   
    
    $.ajax({
		type: "POST",
		url: url,
		dataType: "html",
		data: urlString,		
		success: function(responseHtml,textStatus){			
	    	document.getElementById("countyRow").style.display = 'none'; 
	    	if(document.getElementById("countyRowMsg")){
	    		document.getElementById("countyRowMsg").style.display = 'none'; 
	    		document.getElementById("countyRowUnknown").style.display = 'none'; 
	    	}
	    	

	    	var countyDropDown = addressForm.county;
	        var availCountyLength = countyDropDown.length;
			
	        for(i = 0; i < availCountyLength; i++){
	 		    if(i != 0) {
	 				countyDropDown.remove(i);	
	 		    }
			}
        
			document.getElementById("mutilplecountyresponse").innerHTML = responseHtml;
			
	       	if(document.getElementById("countyDetails")) { 	
	       		document.getElementById("AJAXload2").style.display = 'none';
				document.getElementById("AJAXload1").style.display = 'none';	
	       		document.getElementById("AJAXload").style.display = 'none';
	 	    	var countyDet = document.getElementById("countyDetails").innerHTML.trim();
	       		
	    	   	if(countyDet != '') {
	        		var countySplit = countyDet.split(":");
			        if(countySplit.length == 1) {
			        	var countyVal = countySplit[0].split("|");
		        
			        	var countyDetl = countyVal[0];
			    	
				        var position = countyDetl.indexOf("#",0);
				       	var geo_code = countyDetl.substring(0,position);
						var county_name = countyDetl.substring(position+1,countyDetl.length);
						
						addressForm.taxGeoCode.value = geo_code;
						addressForm.shippingGeoCode.value = geo_code;
						position = county_name.indexOf("#",0);
						county_code = county_name.substring(position+1,county_name.length);
						countyname = county_name.substring(0,position);
						countyname = countyname.trim();
						
						addressForm.address3.value = countyname+"#"+county_code;             
			        	
						addressForm.phone1.value = fnoldformatPhoneNbr(reformat(addressForm.dphone.value))+"#"+addressForm.dExt.value;
						addressForm.phone2.value = fnoldformatPhoneNbr(reformat(addressForm.ephone.value))+"#"+addressForm.eExt.value;
						
			   
	        			addressForm.submit();
			       }
			        else {
			        	var count;
	        		    for(count = 1; count <= countySplit.length; count++){
	         		         var countyValue = countySplit[count-1].split("|") ;
					         var selObj = document.getElementById("county");
					         //alert('county='+countyValue);
					         selObj.options[count] = new Option(countyValue[1] ,countyValue[0] );
						}
						
						// reset the county if it had set before
					   	if (prevcounty != '' && addressForm.county) {
					   		if (addressForm.county.options) {
					   			// loop through the list in case it has changed
					   			for(count=0; count < addressForm.county.options.length; count++) {
					   				if (prevcounty == addressForm.county.options[count].value) {
					   					addressForm.county.value = prevcounty;
					   					break;
					   				}
					   			}
					   		}
				    	}
						
				       	document.getElementById("countyRow").style.display = '';
				       	if(document.getElementById("countyRowMsg")){
				    		document.getElementById("countyRowMsg").style.display = ''; 
				    		document.getElementById("countyRowUnknown").style.display = '';
				    	}
				    	 
				        document.getElementById("errorMsg2").style.display = 'none';
			        } 
				}
			}
         
         	if (document.getElementById ("errorMessageCount") ) { 	
         		//document.getElementById("AJAXload").style.display = 'none';
            	var errorMessage = document.getElementById("errorMessageCount").innerHTML;
          		var actual = errorMessage.trim();
	         	if (actual != '') {
	         		prevcity = '';
					prevstate = '';
					prevzipcode = '';
					prevcounty = '';
	         		document.getElementById("errorMsg2").innerHTML = ''+actual+'';
		         	document.getElementById("errorMsg2").style.display = '';
	            }
        	} 
        	
        	if (submitOnSuccess && (document.getElementById("errorMsg2").innerHTML.trim() == '')) {
	        	var position = addressForm.county.value.indexOf("#",0);
			    if(position == -1) {
			    	addressForm.address3.value = "UNKNOWN";
			    }
			    else { 
					var geo_code = addressForm.county.value.substring(0,position);
					var county_name = addressForm.county.value.substring(position+1,addressForm.county.value.length);
			
			        addressForm.taxGeoCode.value = geo_code;
					addressForm.shippingGeoCode.value = geo_code;
					position = county_name.indexOf("#",0);
					county_code = county_name.substring(position+1,county_name.length);
					countyname = county_name.substring(0,position);
					countyname = countyname.trim();
					addressForm.address3.value = countyname+"#"+county_code;
				}
				
			        // post the old phone number format
				addressForm.phone1.value = fnoldformatPhoneNbr(reformat(addressForm.dphone.value))+"#"+addressForm.dExt.value;
				addressForm.phone2.value = fnoldformatPhoneNbr(reformat(addressForm.ephone.value))+"#"+addressForm.eExt.value;
				
			    addressForm.submit();
			    
			    return;
		    } 
			
    	},
    	
		error: function(XMLHttpRequest, textStatus, errorThrown) {
            err = document.getElementById("errorMsg2");  
            err.style.display= "";
            err.innerHTML =="Error processing your request, please try again later.";
        }
	});     
    	}
    
      
function validateAddress(addressForm, checkCountryEnabled){ 
	// only check country logic when it's enabled, default to US
	var cntry="US";
	if (checkCountryEnabled) {
		// reset to empty/CA, then assign US if checked
		cntry="";
		if (document.getElementById("USA")) {
			if(document.getElementById("USA").checked){
		 		cntry = "US";
		 	}
	 	}
 	}
 	
 	//PO BOX check for express checkout in shiping
        if(document.getElementById("shipExpCheckout")!=null && document.getElementById("shipExpCheckout").checked){
        
        	var addressExp1=(addressForm.address1.value.split(' ').join('')).toUpperCase();
			var addressExp2=(addressForm.address2.value.split(' ').join('')).toUpperCase();
			addressExp1 = addressExp1.replace(/\./g,""); //to remove periods
			addressExp2 = addressExp2.replace(/\./g,""); //to remove periods
			
			if((addressExp1.indexOf('POBOX')!=-1)|| (addressExp1.indexOf('P0BOX')!=-1) || (addressExp1.indexOf('POSTBOX')!=-1) || (addressExp1.indexOf('P0STBOX')!=-1) ||
				 (addressExp1.indexOf('POSTOFFICEBOX')!=-1) ||(addressExp2.indexOf('POBOX')!=-1) || (addressExp2.indexOf('P0BOX')!=-1) || 
				 (addressExp2.indexOf('POSTBOX')!=-1)|| (addressExp2.indexOf('P0STBOX')!=-1) || (addressExp2.indexOf('POSTOFFICEBOX')!=-1)){				
				err = document.getElementById("errorMsg2");
				err.style.display= "";
				err.innerHTML = "A PO Box address cannot be selected as an Express Checkout default. Please select another address.";
				
				return 1;
				 
			}
        	
        }

	var dPhoneVal = addressForm.day1.value;
	var tel = fnValidatePhone(phoneTrim(reformat(dPhoneVal)));
    var etel = true;
	if(addressForm.eve1.value != ""){
	 	etel = fnValidatePhone(phoneTrim(reformat(addressForm.eve1.value )));
	} 	
	
	// check valid zip code or postal code if canadian 
	if (cntry == "US") {
		var zip = fnIsNumeric(addressForm.zipCode.value);
	} else {
		var regEx = /^[0-9,a-z,A-Z]+$/;  
		if (!regEx.test(addressForm.postalCode.value)){  
				postal=false;
		}else{
			postal= true;
		}
	}  
	 	
 	if(addressForm.firstName.value == ""){
		err = document.getElementById("errorMsg2");
		err.style.display = "block";
		err.innerHTML = "Please enter a First Name.";
		return 1;
 	}document.getElementById("errorMsg2");
 	if(!nameValidation(addressForm.firstName.value)){
		err = document.getElementById("errorMsg2");
		err.style.display= "";
		err.innerHTML = "Please enter a valid First Name.";
		return 1;
 	}
 	if(addressForm.lastName.value == ""){
		err = document.getElementById("errorMsg2");
		err.style.display= "";
		err.innerHTML = "Please enter a Last Name.";
		return 1;
 	}
 	if(!nameValidation(addressForm.lastName.value)){
		err = document.getElementById("errorMsg2"); 
		err.style.display= "";
		err.innerHTML = "Please enter a valid Last Name.";
		return 1;
 	}
 	if(addressForm.address1.value == ""){
		err = document.getElementById("errorMsg2");
		err.style.display= "";
		err.innerHTML = "Please enter Address Line 1.";
		return 1;
 	}
 	if(addressForm.city.value == ""){
		err = document.getElementById("errorMsg2");
		err.style.display= "";
		err.innerHTML = "Please enter a City.";
		return 1;
 	}

	if (cntry == "US") {
	 	if(addressForm.zipCode.value == ""){
			err = document.getElementById("errorMsg2");
			err.style.display= "";
			err.innerHTML = "Please enter a Zip Code.";	
			return 1;
	 	}
	 	if(!zip){
			err = document.getElementById("errorMsg2");
			err.style.display= "";
			err.innerHTML = "Please enter a valid 5-digit ZIP Code. ";
			return 1;
	 	}
	 	if(addressForm.zipCode.value.length != 5){
			err = document.getElementById("errorMsg2"); 
			err.style.display= "";
			err.innerHTML = "Please enter a valid 5-digit ZIP Code. ";
			return 1;
		}
	} 
	else {
	 	if (addressForm.postalCode.value == ""){
			err = document.getElementById("errorMsg2");
			getObjectInnerTextAddress(err,"Please enter a Postal Code.");  
			//check=1;
			return 1;
	 	}
	 	if(!postal){
			err = document.getElementById("errorMsg2");
			getObjectInnerTextAddress(err,"Please enter a valid 6-digit Postal Code.");  
			//check=1;
			return 1;
	 	}
	 	if(addressForm.postalCode.value.length != 6){
			err = document.getElementById("errorMsg2"); 
			getObjectInnerTextAddress(err,"Please enter a valid 6-digit Postal Code.");  
			//check=1;
			return 1;
	 	}
	}
	
 	if(addressForm.day1.value == ""){
		err = document.getElementById("errorMsg2");
		err.style.display= "";
		err.innerHTML = "Please enter a valid 10 digit Phone Number.";
		return 1;
 	}
 	if(!tel && addressForm.day1.value != ""){
		err = document.getElementById("errorMsg2");
		err.style.display= "";
		err.innerHTML = "Please enter a valid 10 digit Phone Number.";
		return 1;
 	}
 	if(!etel){
		err = document.getElementById("errorMsg2");
		err.style.display= "";
		err.innerHTML = "Please enter a valid 10 digit Phone Number.";
		return 1;
 	}
 	if(addressForm.ext1.value != ""){
    	var extension =  fnIsNumeric(phoneTrim(addressForm.ext1.value)); 
     	if (!extension) {
	        err = document.getElementById("errorMsg2");
	        err.style.display="";
	        err.className="errorBox";
	        err.innerHTML = "Please enter a valid Extension.";
	    	return 1;
		}
	}

	if(addressForm.ext2.value != ""){
    	var extension1 =  fnIsNumeric(phoneTrim(addressForm.ext2.value)); 
     	if(!extension1) {
			err = document.getElementById("errorMsg2");
	        err.style.display="";
	        err.className="errorBox";
	        err.innerHTML = "Please enter a valid Extension.";
	        return 1;
    	}
	} 
      
    if (etel){
 		addressForm.day1.value = fnReformatPhoneNbrAddressBook(phoneTrim(reformat(addressForm.day1.value)));
 		addressForm.eve1.value = fnReformatPhoneNbrAddressBook(phoneTrim(reformat(addressForm.eve1.value)));
 		return 0;
 	}
 	
} 

function fnReformatPhoneNumber(phoneNumber){	
	out = "-"; // replace this
	add = ""; // with this
	temp = "" + phoneNumber; // temporary holder

	while (temp.indexOf(out)>-1) {
		pos= temp.indexOf(out);
		temp = "" + (temp.substring(0, pos) + add + 
		temp.substring((pos + out.length), temp.length));
	}
	out = " "; // replace this
	add = ""; // with this
	while (temp.indexOf(out)>-1) {
		pos= temp.indexOf(out);
		temp = "" + (temp.substring(0, pos) + add + 
		temp.substring((pos + out.length), temp.length));
	}
	out = "("; // replace this
	add = ""; // with this
	while (temp.indexOf(out)>-1) {
		pos= temp.indexOf(out);
		temp = "" + (temp.substring(0, pos) + add + 
		temp.substring((pos + out.length), temp.length));
	}
	out = ")"; // replace this
	add = ""; // with this
	while (temp.indexOf(out)>-1) {
		pos= temp.indexOf(out);
		temp = "" + (temp.substring(0, pos) + add + 
		temp.substring((pos + out.length), temp.length));
	}
	
	var phone_number = "";
	i1=0;
	for(i=0;i<temp.length;i++){  
        var ch = temp.charAt(i);
        if((i ==3) || (i==6))
        {
              phone_number = phone_number + "-"+ ch;
        }
        else 
        {
           phone_number =  phone_number + ch;
           //i1++;
        }
	}
			
	return phone_number;
}

function nameValidation(name){
	if(!((name.charCodeAt(0)>64 && name.charCodeAt(0)<91)||(name.charCodeAt(0)>96 && name.charCodeAt(0)<123))){
		return 0;
	}

	for(iLoop=1;iLoop<name.length;iLoop++){
		if(!((name.charCodeAt(iLoop)>64 && name.charCodeAt(iLoop)<91)||(name.charCodeAt(iLoop)>96 && name.charCodeAt(iLoop)<123)||(name.charCodeAt(iLoop)>48 && name.charCodeAt(iLoop)<58)||(name.charCodeAt(iLoop)==32)||(name.charCodeAt(iLoop)==39)||(name.charCodeAt(iLoop)==45)||(name.charCodeAt(iLoop)==46))){
			return 0;
        }
    }                       

	if(iLoop == name.length)
    {
		return 1;
	}
}

function fnFormatPhoneNbrForEdit(phoneNumber, phoneNumberType) {
	var temp = phoneNumber;
	var phone_number = "";
	phone_number = temp.substring(0,3)+ temp.substring(4,7)+ temp.substring(8,12);
	formattedNbr = fnReformatPhoneNbrAddressBook(phone_number);
	if(phoneNumberType == 'day') {
		document.getElementById("phone1Lbl").value = formattedNbr;
	}
	if(phoneNumberType == 'eve') {
		document.getElementById("phone2Lbl").value = formattedNbr;
	}
} 
function fnReformatPhoneNbrAddressBook (phoneNumber ) {
	 var out = "-"; // replace this
	 var add = ""; // with this
	 var temp = "";
	 temp = phoneNumber;
     var phone_number = "";
	 //temp = "" + phoneNumber; // temporary holder
 	 var firstDigit= temp.substring(0,1);
	 if((firstDigit == 0 || firstDigit == 1) && temp.length > 10) {
	       for(i=0; i<=10; i++) {  
	          var ch = temp.charAt(i);
              if (i == 0 ) {
                 phone_number = phone_number + "(";
   	          }		
 	          else if ( i== 4 ) {
		         phone_number = phone_number + ")"+ch;
	          }
	          else if (i == 7) {
		         phone_number = phone_number + "-"+ ch;
		      }    
	          else {
	             phone_number =  phone_number + ch;
              } 
	       }
        		 
	 }
     else if(temp.length >= 10) {
           for(i=0; i<=9; i++){  
	          var ch = temp.charAt(i);
	          if (i == 0 ) {
                 phone_number = phone_number + "(" + ch;
              }	
              else if ( i == 3 ) {
	             phone_number = phone_number + ")" + ch;
              }
              else if (i == 6) {
	             phone_number = phone_number + "-"+ ch;
              }     	
		      else {
		         phone_number =  phone_number + ch;
	          }
		   }	          
     }
     
   	 return phone_number;
}

function fnoldformatPhoneNbr(phoneNumber ) {
	 var out = "-"; // replace this
	 var add = ""; // with this
	 var temp = "";
	 temp = phoneNumber;
     var phone_number = "";
	 //temp = "" + phoneNumber; // temporary holder
 	 var firstDigit= temp.substring(0,1);
	 if((firstDigit == 0 || firstDigit == 1) && temp.length > 10) {
	       for(i=0; i<=10; i++) {  
	          var ch = temp.charAt(i);
             	
 	          if ( i== 4 ) {
		         phone_number = phone_number + "-"+ch;
	          }
	          else if (i == 7) {
		         phone_number = phone_number + "-"+ ch;
		      }    
	          else {
	             phone_number =  phone_number + ch;
              } 
	       }
        		 
	 }
     else if(temp.length >= 10) {
           for(i=0; i<=9; i++){  
	          var ch = temp.charAt(i);
	        
              if ( i == 3 ) {
	             phone_number = phone_number + "-" + ch;
              }
              else if (i == 6) {
	             phone_number = phone_number + "-"+ ch;
              }     	
		      else {
		         phone_number =  phone_number + ch;
	          }
		   }	          
     }
     
   	 return phone_number;
}

function resetAddressForm(addressForm) {
	// this only clears new address form.  If editing an address
	// on the shipping page the data isn't cleared because the 
	// user must click the cancel button
	var newAddressFrm = $('#newAddressForm');
	
	// If collapsing the new address form then clear the fields.
	if ($(newAddressFrm).length == 1 && $(newAddressFrm).css('display') != 'none'){
		addressForm.firstName.value = "";
		addressForm.lastName.value = "";
		addressForm.address1.value = "";
		addressForm.address2.value = "";
		addressForm.city.value = "";
		addressForm.zipCode.value = "";
		addressForm.ext1.value = "";
		addressForm.ext2.value = "";
		addressForm.day1.value = "";
		addressForm.eve1.value = "";
		addressForm.phone1.value = "";
		addressForm.phone2.value = "";
	}
	
	// close the address form
	//$("#newAddressLink").click();
}

  
function ajaxCallForDefaultAddress(strId) {
    document.getElementById("saveError").style.display = 'none'; 
    document.getElementById("callout").style.display = 'none'; 
    var addressPageOpt = {
	    method: 'GET',
	    asynchronous: true,
	    postBody: '',
 
	    //Handle successful response
	    onSuccess: function(t) {
	    	document.getElementById("expressResult").innerHTML = t.responseText;
	    	var response = document.getElementById("addressError").value;
	    	sendOmnitureExpressCheckoutDefault("ExpressDefaultProfile");
	    	if(response == 'true'){
	    		document.getElementById("saveError").style.display = ''; 
	    	}
	    	else{
	    		document.getElementById("callout").style.display = ''; 
 
				// set the cookies to indicate that a default was set in this session
				// make sure a change has actually happened
				/*Universal Chnge*/
				var billingId = document.getElementById("expressBilling").value;
				var shippingId = document.getElementById("expressShipping").value;
				/*Universal Chnge End*/
				var prevBillingId = document.getElementById("prevBilling").value;
				var prevShippingId = document.getElementById("prevShipping").value;
					
	    		if (billingId != '' && billingId != prevBillingId) {
	    			document.cookie = "expressBilling=Y;";
	    		}
	    		if (shippingId != '' && shippingId != prevShippingId) {
	    			document.cookie = "expressShipping=Y;";
	    		}
	    	}
    	},
    	
        // Handle other errors
        onFailure: function(t) {
           document.getElementById("saveError").style.display = ''; 
        }
       
    };  
    /*Universal Chnge*/     
    var urlString = "billingAddress=" + document.getElementById("expressBilling").value ;
    urlString = urlString + "&shippingAddress=" + document.getElementById("expressShipping").value ;
    /*Universal Chnge End*/
    urlString = urlString + "&storeId=" +strId;
    
    var url = "ExpressAddDefaultAddressAndCardCmd?"+urlString; 

    new searsAjax(url, addressPageOpt); 
      
}
function sendOmnitureExpressCheckoutDefault(spropValue) { 
	omSprop28 = spropValue; 
	if (typeof s != 'undefined') 
		s.t(); 
}


